From ebda60443b2eed97d447ef4bcd33c7c702ddbf49 Mon Sep 17 00:00:00 2001 From: s00442234 Date: Mon, 9 May 2022 11:40:28 +0800 Subject: [PATCH] Feat:add dfx trace Signed-off-by: s00442234 --- include/trace/events/platform_trace_event.h | 30 +++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 include/trace/events/platform_trace_event.h diff --git a/include/trace/events/platform_trace_event.h b/include/trace/events/platform_trace_event.h new file mode 100644 index 000000000000..899a583fd124 --- /dev/null +++ b/include/trace/events/platform_trace_event.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM platform_trace_event + +#if !defined(_TRACE_PLATFORM_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_PLATFORM_TRACE_EVENT_H + +#include + +TRACE_EVENT(platfrom_trace_record_messages, + TP_PROTO( + const char *buf + ), + + TP_ARGS(buf), + + TP_STRUCT__entry( + __string(msg, buf) + ), + + TP_fast_assign( + __assign_str(msg, buf) + ), + + TP_printk("platform trace info msg='%s'", __get_str(msg)) +); +#endif /* _TRACE_PLATFORM_TRACE_EVENT_H */ + +/* This part must be outside protection */ +#include \ No newline at end of file -- Gitee