2 * Copyright (C) 2013 Google, Inc.
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
16 #define TRACE_SYSTEM adf
18 #if !defined(__VIDEO_ADF_ADF_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
19 #define __VIDEO_ADF_ADF_TRACE_H
21 #include <linux/tracepoint.h>
22 #include <video/adf.h>
24 TRACE_EVENT(adf_event,
25 TP_PROTO(struct adf_obj *obj, enum adf_event_type type),
29 __string(name, obj->name)
30 __field(enum adf_event_type, type)
31 __array(char, type_str, 32)
34 __assign_str(name, obj->name);
36 strlcpy(__entry->type_str, adf_event_type_str(obj, type),
37 sizeof(__entry->type_str));
39 TP_printk("obj=%s type=%u (%s)",
45 TRACE_EVENT(adf_event_enable,
46 TP_PROTO(struct adf_obj *obj, enum adf_event_type type),
50 __string(name, obj->name)
51 __field(enum adf_event_type, type)
52 __array(char, type_str, 32)
55 __assign_str(name, obj->name);
57 strlcpy(__entry->type_str, adf_event_type_str(obj, type),
58 sizeof(__entry->type_str));
60 TP_printk("obj=%s type=%u (%s)",
66 TRACE_EVENT(adf_event_disable,
67 TP_PROTO(struct adf_obj *obj, enum adf_event_type type),
71 __string(name, obj->name)
72 __field(enum adf_event_type, type)
73 __array(char, type_str, 32)
76 __assign_str(name, obj->name);
78 strlcpy(__entry->type_str, adf_event_type_str(obj, type),
79 sizeof(__entry->type_str));
81 TP_printk("obj=%s type=%u (%s)",
87 #endif /* __VIDEO_ADF_ADF_TRACE_H */
89 #undef TRACE_INCLUDE_PATH
90 #undef TRACE_INCLUDE_FILE
91 #define TRACE_INCLUDE_PATH .
92 #define TRACE_INCLUDE_FILE adf_trace
93 #include <trace/define_trace.h>