mirror of
https://gitee.com/openharmony/developtools_profiler
synced 2024-11-27 00:51:47 +00:00
告警处理
Signed-off-by: zengxj <zengxiangjun8@h-partners.com> Change-Id: I126ccb4b22d47bfcb2e479d59c9afd7613088eee
This commit is contained in:
parent
3e666fa31e
commit
c5f51f1ebc
@ -151,6 +151,8 @@ class EventParserCodeGenerator(FtraceEventCodeGenerator):
|
||||
|
||||
def generate_parse_functions(self, category, f):
|
||||
count = 0
|
||||
if category not in self.grouped_event_formats.keys():
|
||||
return
|
||||
for event in self.grouped_event_formats[category]:
|
||||
count += 1
|
||||
if count > 1:
|
||||
|
@ -122,14 +122,16 @@ private:
|
||||
std::thread logSaver_;
|
||||
};
|
||||
|
||||
#define HHLOG(level, expression, format, ...) { \
|
||||
#define HHLOG(level, expression, format, ...) { \
|
||||
if ((expression) and \
|
||||
(!HHLogger::GetInstance().IsStopped()) and \
|
||||
(HHLogger::GetInstance().GetLogLevel() <= HHLOG_##level)) { \
|
||||
const char prefix[] {" [" #level "] %s %d %s: %s"}; \
|
||||
char buffer[HHLogger::MAX_FORMAT_SIZE]; \
|
||||
(void)snprintf_s(buffer, sizeof(buffer), sizeof(buffer) -1, \
|
||||
prefix, __FILE__, __LINE__, __FUNCTION__, format); \
|
||||
if (snprintf_s(buffer, sizeof(buffer), sizeof(buffer) -1, \
|
||||
prefix, __FILE__, __LINE__, __FUNCTION__, format) < 0) { \
|
||||
HHLogger::GetInstance().PutLog("snprintf_s error!"); \
|
||||
} \
|
||||
HHLogger::GetInstance().PutLog(buffer, ##__VA_ARGS__); \
|
||||
} \
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user