almk.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License version 2 and
  5. * only version 2 as published by the Free Software Foundation.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. */
  12. #undef TRACE_SYSTEM
  13. #define TRACE_SYSTEM almk
  14. #if !defined(_TRACE_EVENT_ALMK_H) || defined(TRACE_HEADER_MULTI_READ)
  15. #define _TRACE_EVENT_ALMK_H
  16. #include <linux/tracepoint.h>
  17. #include <linux/types.h>
  18. TRACE_EVENT(almk_vmpressure,
  19. TP_PROTO(unsigned long pressure,
  20. int other_free,
  21. int other_file),
  22. TP_ARGS(pressure, other_free, other_file),
  23. TP_STRUCT__entry(
  24. __field(unsigned long, pressure)
  25. __field(int, other_free)
  26. __field(int, other_file)
  27. ),
  28. TP_fast_assign(
  29. __entry->pressure = pressure;
  30. __entry->other_free = other_free;
  31. __entry->other_file = other_file;
  32. ),
  33. TP_printk("%lu, %d, %d",
  34. __entry->pressure, __entry->other_free,
  35. __entry->other_file)
  36. );
  37. TRACE_EVENT(almk_shrink,
  38. TP_PROTO(int tsize,
  39. int vmp,
  40. int other_free,
  41. int other_file,
  42. short adj),
  43. TP_ARGS(tsize, vmp, other_free, other_file, adj),
  44. TP_STRUCT__entry(
  45. __field(int, tsize)
  46. __field(int, vmp)
  47. __field(int, other_free)
  48. __field(int, other_file)
  49. __field(short, adj)
  50. ),
  51. TP_fast_assign(
  52. __entry->tsize = tsize;
  53. __entry->vmp = vmp;
  54. __entry->other_free = other_free;
  55. __entry->other_file = other_file;
  56. __entry->adj = adj;
  57. ),
  58. TP_printk("%d, %d, %d, %d, %d",
  59. __entry->tsize,
  60. __entry->vmp,
  61. __entry->other_free,
  62. __entry->other_file,
  63. __entry->adj)
  64. );
  65. #endif
  66. #include <trace/define_trace.h>