cpufreq_sched.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2015 Steve Muckle <[email protected]>
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #undef TRACE_SYSTEM
  9. #define TRACE_SYSTEM cpufreq_sched
  10. #if !defined(_TRACE_CPUFREQ_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
  11. #define _TRACE_CPUFREQ_SCHED_H
  12. #include <linux/sched.h>
  13. #include <linux/tracepoint.h>
  14. TRACE_EVENT(cpufreq_sched_throttled,
  15. TP_PROTO(unsigned int rem),
  16. TP_ARGS(rem),
  17. TP_STRUCT__entry(
  18. __field( unsigned int, rem)
  19. ),
  20. TP_fast_assign(
  21. __entry->rem = rem;
  22. ),
  23. TP_printk("throttled - %d usec remaining", __entry->rem)
  24. );
  25. TRACE_EVENT(cpufreq_sched_request_opp,
  26. TP_PROTO(int cpu,
  27. unsigned long capacity,
  28. unsigned int freq_new,
  29. unsigned int requested_freq),
  30. TP_ARGS(cpu, capacity, freq_new, requested_freq),
  31. TP_STRUCT__entry(
  32. __field( int, cpu)
  33. __field( unsigned long, capacity)
  34. __field( unsigned int, freq_new)
  35. __field( unsigned int, requested_freq)
  36. ),
  37. TP_fast_assign(
  38. __entry->cpu = cpu;
  39. __entry->capacity = capacity;
  40. __entry->freq_new = freq_new;
  41. __entry->requested_freq = requested_freq;
  42. ),
  43. TP_printk("cpu %d cap change, cluster cap request %ld => OPP %d "
  44. "(cur %d)",
  45. __entry->cpu, __entry->capacity, __entry->freq_new,
  46. __entry->requested_freq)
  47. );
  48. TRACE_EVENT(cpufreq_sched_update_capacity,
  49. TP_PROTO(int cpu,
  50. bool request,
  51. struct sched_capacity_reqs *scr,
  52. unsigned long new_capacity),
  53. TP_ARGS(cpu, request, scr, new_capacity),
  54. TP_STRUCT__entry(
  55. __field( int, cpu)
  56. __field( bool, request)
  57. __field( unsigned long, cfs)
  58. __field( unsigned long, rt)
  59. __field( unsigned long, dl)
  60. __field( unsigned long, total)
  61. __field( unsigned long, new_total)
  62. ),
  63. TP_fast_assign(
  64. __entry->cpu = cpu;
  65. __entry->request = request;
  66. __entry->cfs = scr->cfs;
  67. __entry->rt = scr->rt;
  68. __entry->dl = scr->dl;
  69. __entry->total = scr->total;
  70. __entry->new_total = new_capacity;
  71. ),
  72. TP_printk("cpu=%d set_cap=%d cfs=%ld rt=%ld dl=%ld old_tot=%ld "
  73. "new_tot=%ld",
  74. __entry->cpu, __entry->request, __entry->cfs, __entry->rt,
  75. __entry->dl, __entry->total, __entry->new_total)
  76. );
  77. #endif /* _TRACE_CPUFREQ_SCHED_H */
  78. /* This part must be outside protection */
  79. #include <trace/define_trace.h>