~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/error_report.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Declarations for error reporting tracepoints.
  4  *
  5  * Copyright (C) 2021, Google LLC.
  6  */
  7 #undef TRACE_SYSTEM
  8 #define TRACE_SYSTEM error_report
  9 
 10 #if !defined(_TRACE_ERROR_REPORT_H) || defined(TRACE_HEADER_MULTI_READ)
 11 #define _TRACE_ERROR_REPORT_H
 12 
 13 #include <linux/tracepoint.h>
 14 
 15 #ifndef __ERROR_REPORT_DECLARE_TRACE_ENUMS_ONCE_ONLY
 16 #define __ERROR_REPORT_DECLARE_TRACE_ENUMS_ONCE_ONLY
 17 
 18 enum error_detector {
 19         ERROR_DETECTOR_KFENCE,
 20         ERROR_DETECTOR_KASAN,
 21         ERROR_DETECTOR_WARN,
 22 };
 23 
 24 #endif /* __ERROR_REPORT_DECLARE_TRACE_ENUMS_ONCE_ONLY */
 25 
 26 #define error_detector_list                     \
 27         EM(ERROR_DETECTOR_KFENCE, "kfence")     \
 28         EM(ERROR_DETECTOR_KASAN, "kasan")       \
 29         EMe(ERROR_DETECTOR_WARN, "warning")
 30 /* Always end the list with an EMe. */
 31 
 32 #undef EM
 33 #undef EMe
 34 
 35 #define EM(a, b)        TRACE_DEFINE_ENUM(a);
 36 #define EMe(a, b)       TRACE_DEFINE_ENUM(a);
 37 
 38 error_detector_list
 39 
 40 #undef EM
 41 #undef EMe
 42 
 43 #define EM(a, b) { a, b },
 44 #define EMe(a, b) { a, b }
 45 
 46 #define show_error_detector_list(val) \
 47         __print_symbolic(val, error_detector_list)
 48 
 49 DECLARE_EVENT_CLASS(error_report_template,
 50                     TP_PROTO(enum error_detector error_detector, unsigned long id),
 51                     TP_ARGS(error_detector, id),
 52                     TP_STRUCT__entry(__field(enum error_detector, error_detector)
 53                                              __field(unsigned long, id)),
 54                     TP_fast_assign(__entry->error_detector = error_detector;
 55                                    __entry->id = id;),
 56                     TP_printk("[%s] %lx",
 57                               show_error_detector_list(__entry->error_detector),
 58                               __entry->id));
 59 
 60 /**
 61  * error_report_end - called after printing the error report
 62  * @error_detector:     short string describing the error detection tool
 63  * @id:                 pseudo-unique descriptor identifying the report
 64  *                      (e.g. the memory access address)
 65  *
 66  * This event occurs right after a debugging tool finishes printing the error
 67  * report.
 68  */
 69 DEFINE_EVENT(error_report_template, error_report_end,
 70              TP_PROTO(enum error_detector error_detector, unsigned long id),
 71              TP_ARGS(error_detector, id));
 72 
 73 #endif /* _TRACE_ERROR_REPORT_H */
 74 
 75 /* This part must be outside protection */
 76 #include <trace/define_trace.h>
 77 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php