e1000e_trace.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /* Copyright(c) 2022, Intel Corporation. */
  3. /* Modeled on trace-events-sample.h */
  4. /* The trace subsystem name for e1000e will be "e1000e_trace".
  5. *
  6. * This file is named e1000e_trace.h.
  7. *
  8. * Since this include file's name is different from the trace
  9. * subsystem name, we'll have to define TRACE_INCLUDE_FILE at the end
  10. * of this file.
  11. */
  12. #undef TRACE_SYSTEM
  13. #define TRACE_SYSTEM e1000e_trace
  14. #if !defined(_TRACE_E1000E_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_E1000E_TRACE_H
  16. #include <linux/tracepoint.h>
  17. TRACE_EVENT(e1000e_trace_mac_register,
  18. TP_PROTO(uint32_t reg),
  19. TP_ARGS(reg),
  20. TP_STRUCT__entry(__field(uint32_t, reg)),
  21. TP_fast_assign(__entry->reg = reg;),
  22. TP_printk("event: TraceHub e1000e mac register: 0x%08x",
  23. __entry->reg)
  24. );
  25. #endif
  26. /* This must be outside ifdef _E1000E_TRACE_H */
  27. /* This trace include file is not located in the .../include/trace
  28. * with the kernel tracepoint definitions, because we're a loadable
  29. * module.
  30. */
  31. #undef TRACE_INCLUDE_PATH
  32. #define TRACE_INCLUDE_PATH .
  33. #undef TRACE_INCLUDE_FILE
  34. #define TRACE_INCLUDE_FILE e1000e_trace
  35. #include <trace/define_trace.h>