Deleted Added
sdiff udiff text old ( 13322:7391057615bd ) new ( 13324:c8b709468e61 )
full compact
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

--- 22 unchanged lines hidden (view full) ---

31#include <map>
32#include <sstream>
33#include <string>
34
35#include "base/logging.hh"
36#include "systemc/core/process.hh"
37#include "systemc/core/scheduler.hh"
38#include "systemc/ext/core/sc_main.hh"
39#include "systemc/ext/utils/sc_report_handler.hh"
40#include "systemc/utils/report.hh"
41
42namespace sc_core
43{
44
45namespace
46{

--- 10 unchanged lines hidden (view full) ---

57 report(severity, msg_type, msg, SC_MEDIUM, file, line);
58}
59
60void
61sc_report_handler::report(sc_severity severity, const char *msg_type,
62 const char *msg, int verbosity, const char *file,
63 int line)
64{
65 if (severity == SC_INFO && verbosity > sc_gem5::reportVerbosityLevel)
66 return;
67
68 sc_gem5::ReportSevInfo &sevInfo = sc_gem5::reportSevInfos[severity];
69 sc_gem5::ReportMsgInfo &msgInfo = sc_gem5::reportMsgInfoMap[msg_type];
70
71 sevInfo.count++;
72 msgInfo.count++;

--- 49 unchanged lines hidden (view full) ---

122 sc_actions previous = info.actions;
123 info.actions = actions;
124 return previous;
125}
126
127sc_actions
128sc_report_handler::set_actions(const char *msg_type, sc_actions actions)
129{
130 sc_gem5::ReportMsgInfo &info = sc_gem5::reportMsgInfoMap[msg_type];
131 sc_actions previous = info.actions;
132 info.actions = actions;
133 return previous;
134}
135
136sc_actions
137sc_report_handler::set_actions(
138 const char *msg_type, sc_severity severity, sc_actions actions)
139{
140 sc_gem5::ReportMsgInfo &info = sc_gem5::reportMsgInfoMap[msg_type];
141 sc_actions previous = info.sevActions[severity];
142 info.sevActions[severity] = actions;
143 return previous;
144}
145
146int
147sc_report_handler::stop_after(sc_severity severity, int limit)
148{
149 sc_gem5::ReportSevInfo &info = sc_gem5::reportSevInfos[severity];
150 int previous = info.limit;
151 info.limit = limit;
152 return previous;
153}
154
155int
156sc_report_handler::stop_after(const char *msg_type, int limit)
157{
158 sc_gem5::ReportMsgInfo &info = sc_gem5::reportMsgInfoMap[msg_type];
159 int previous = info.limit;
160 info.limit = limit;
161 return previous;
162}
163
164int
165sc_report_handler::stop_after(
166 const char *msg_type, sc_severity severity, int limit)
167{
168 sc_gem5::ReportMsgInfo &info = sc_gem5::reportMsgInfoMap[msg_type];
169 int previous = info.sevLimits[severity];
170 info.sevLimits[severity] = limit;
171 return previous;
172}
173
174int
175sc_report_handler::get_count(sc_severity severity)
176{
177 return sc_gem5::reportSevInfos[severity].count;
178}
179
180int
181sc_report_handler::get_count(const char *msg_type)
182{
183 return sc_gem5::reportMsgInfoMap[msg_type].count;
184}
185
186int
187sc_report_handler::get_count(const char *msg_type, sc_severity severity)
188{
189 return sc_gem5::reportMsgInfoMap[msg_type].sevCounts[severity];
190}
191
192int
193sc_report_handler::set_verbosity_level(int vl)
194{
195 int previous = sc_gem5::reportVerbosityLevel;
196 sc_gem5::reportVerbosityLevel = vl;

--- 197 unchanged lines hidden ---