Vinayak Menon | 11fac0a | 2015-03-04 20:41:21 +0530 | [diff] [blame] | 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 | |
| 13 | #undef TRACE_SYSTEM |
| 14 | #define TRACE_SYSTEM almk |
| 15 | |
| 16 | #if !defined(_TRACE_EVENT_ALMK_H) || defined(TRACE_HEADER_MULTI_READ) |
| 17 | #define _TRACE_EVENT_ALMK_H |
| 18 | |
| 19 | #include <linux/tracepoint.h> |
| 20 | #include <linux/types.h> |
| 21 | |
| 22 | TRACE_EVENT(almk_vmpressure, |
| 23 | |
| 24 | TP_PROTO(unsigned long pressure, |
| 25 | int other_free, |
| 26 | int other_file), |
| 27 | |
| 28 | TP_ARGS(pressure, other_free, other_file), |
| 29 | |
| 30 | TP_STRUCT__entry( |
| 31 | __field(unsigned long, pressure) |
| 32 | __field(int, other_free) |
| 33 | __field(int, other_file) |
| 34 | ), |
| 35 | |
| 36 | TP_fast_assign( |
| 37 | __entry->pressure = pressure; |
| 38 | __entry->other_free = other_free; |
| 39 | __entry->other_file = other_file; |
| 40 | ), |
| 41 | |
| 42 | TP_printk("%lu, %d, %d", |
| 43 | __entry->pressure, __entry->other_free, |
| 44 | __entry->other_file) |
| 45 | ); |
| 46 | |
| 47 | TRACE_EVENT(almk_shrink, |
| 48 | |
| 49 | TP_PROTO(int tsize, |
| 50 | int vmp, |
| 51 | int other_free, |
| 52 | int other_file, |
| 53 | short adj), |
| 54 | |
| 55 | TP_ARGS(tsize, vmp, other_free, other_file, adj), |
| 56 | |
| 57 | TP_STRUCT__entry( |
| 58 | __field(int, tsize) |
| 59 | __field(int, vmp) |
| 60 | __field(int, other_free) |
| 61 | __field(int, other_file) |
| 62 | __field(short, adj) |
| 63 | ), |
| 64 | |
| 65 | TP_fast_assign( |
| 66 | __entry->tsize = tsize; |
| 67 | __entry->vmp = vmp; |
| 68 | __entry->other_free = other_free; |
| 69 | __entry->other_file = other_file; |
| 70 | __entry->adj = adj; |
| 71 | ), |
| 72 | |
| 73 | TP_printk("%d, %d, %d, %d, %d", |
| 74 | __entry->tsize, |
| 75 | __entry->vmp, |
| 76 | __entry->other_free, |
| 77 | __entry->other_file, |
| 78 | __entry->adj) |
| 79 | ); |
| 80 | |
| 81 | #endif |
| 82 | |
| 83 | #include <trace/define_trace.h> |
| 84 | |