napi.h 974 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #undef TRACE_SYSTEM
  2. #define TRACE_SYSTEM napi
  3. #if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ)
  4. #define _TRACE_NAPI_H_
  5. #include <linux/netdevice.h>
  6. #include <linux/tracepoint.h>
  7. #include <linux/ftrace.h>
  8. #define NO_DEV "(no_device)"
  9. TRACE_EVENT(napi_poll,
  10. TP_PROTO(struct napi_struct *napi, int work, int budget),
  11. TP_ARGS(napi, work, budget),
  12. TP_STRUCT__entry(
  13. __field( struct napi_struct *, napi)
  14. __string( dev_name, napi->dev ? napi->dev->name : NO_DEV)
  15. __field( int, work)
  16. __field( int, budget)
  17. ),
  18. TP_fast_assign(
  19. __entry->napi = napi;
  20. __assign_str(dev_name, napi->dev ? napi->dev->name : NO_DEV);
  21. __entry->work = work;
  22. __entry->budget = budget;
  23. ),
  24. TP_printk("napi poll on napi struct %p for device %s work %d budget %d",
  25. __entry->napi, __get_str(dev_name),
  26. __entry->work, __entry->budget)
  27. );
  28. #undef NO_DEV
  29. #endif /* _TRACE_NAPI_H_ */
  30. /* This part must be outside protection */
  31. #include <trace/define_trace.h>