sc_report_handler.cc (13312:a7685ffbead8) | sc_report_handler.cc (13313:306a97d3b040) |
---|---|
1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 75 unchanged lines hidden (view full) --- 84 actions |= sc_gem5::reportForcedActions; 85 86 msgInfo.checkLimits(severity, actions); 87 sevInfo.checkLimit(actions); 88 89 ::sc_gem5::Process *current = ::sc_gem5::scheduler.current(); 90 sc_report report(severity, msg_type, msg, verbosity, file, line, 91 sc_time::from_value(::sc_gem5::scheduler.getCurTick()), | 1/* 2 * Copyright 2018 Google, Inc. 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions are 6 * met: redistributions of source code must retain the above copyright 7 * notice, this list of conditions and the following disclaimer; 8 * redistributions in binary form must reproduce the above copyright --- 75 unchanged lines hidden (view full) --- 84 actions |= sc_gem5::reportForcedActions; 85 86 msgInfo.checkLimits(severity, actions); 87 sevInfo.checkLimit(actions); 88 89 ::sc_gem5::Process *current = ::sc_gem5::scheduler.current(); 90 sc_report report(severity, msg_type, msg, verbosity, file, line, 91 sc_time::from_value(::sc_gem5::scheduler.getCurTick()), |
92 current ? current->name() : nullptr, -1); | 92 current ? current->name() : nullptr, msgInfo.id); |
93 94 if (actions & SC_CACHE_REPORT) { 95 if (current) { 96 current->lastReport(&report); 97 } else { 98 sc_gem5::globalReportCache = 99 std::unique_ptr<sc_report>(new sc_report(report)); 100 } 101 } 102 103 sc_gem5::reportHandlerProc(report, actions); 104} 105 106void | 93 94 if (actions & SC_CACHE_REPORT) { 95 if (current) { 96 current->lastReport(&report); 97 } else { 98 sc_gem5::globalReportCache = 99 std::unique_ptr<sc_report>(new sc_report(report)); 100 } 101 } 102 103 sc_gem5::reportHandlerProc(report, actions); 104} 105 106void |
107sc_report_handler::report(sc_severity, int id, const char *msg, | 107sc_report_handler::report(sc_severity severity, int id, const char *msg, |
108 const char *file, int line) 109{ | 108 const char *file, int line) 109{ |
110 warn("%s:%d %s\n", file, line, msg); 111 warn("%s not implemented.\n", __PRETTY_FUNCTION__); | 110 std::string &msg_type = sc_gem5::reportIdToMsgMap[id]; 111 if (msg_type == "") 112 msg_type = "unknown id"; 113 114 if (sc_gem5::reportWarningsAsErrors && severity == SC_WARNING) 115 severity = SC_ERROR; 116 117 report(severity, msg_type.c_str(), msg, file, line); |
112} 113 114sc_actions 115sc_report_handler::set_actions(sc_severity severity, sc_actions actions) 116{ 117 sc_gem5::ReportSevInfo &info = sc_gem5::reportSevInfos[severity]; 118 sc_actions previous = info.actions; 119 info.actions = actions; --- 270 unchanged lines hidden --- | 118} 119 120sc_actions 121sc_report_handler::set_actions(sc_severity severity, sc_actions actions) 122{ 123 sc_gem5::ReportSevInfo &info = sc_gem5::reportSevInfos[severity]; 124 sc_actions previous = info.actions; 125 info.actions = actions; --- 270 unchanged lines hidden --- |