1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Support Camera Imaging tracer core.
5 * Copyright (c) 2013 Intel Corporation. All Rights Reserved.
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License version
9 * 2 as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
19 #define TRACE_SYSTEM atomisp
21 #if !defined(ATOMISP_TRACE_EVENT_H) || defined(TRACE_HEADER_MULTI_READ)
22 #define ATOMISP_TRACE_EVENT_H
24 #include <linux/tracepoint.h>
25 #include <linux/string.h>
26 TRACE_EVENT(camera_meminfo,
28 TP_PROTO(const char *name, int uptr_size, int counter, int sys_size,
29 int sys_res_size, int cam_sys_use, int cam_dyc_use,
32 TP_ARGS(name, uptr_size, counter, sys_size, sys_res_size, cam_sys_use,
33 cam_dyc_use, cam_res_use),
36 __array(char, name, 24)
37 __field(int, uptr_size)
39 __field(int, sys_size)
40 __field(int, sys_res_size)
41 __field(int, cam_res_use)
42 __field(int, cam_dyc_use)
43 __field(int, cam_sys_use)
47 strscpy(__entry->name, name, 24);
48 __entry->uptr_size = uptr_size;
49 __entry->counter = counter;
50 __entry->sys_size = sys_size;
51 __entry->sys_res_size = sys_res_size;
52 __entry->cam_res_use = cam_res_use;
53 __entry->cam_dyc_use = cam_dyc_use;
54 __entry->cam_sys_use = cam_sys_use;
58 "<%s> User ptr memory:%d pages,\tISP private memory used:%d pages:\tsysFP system size:%d,\treserved size:%d\tcamFP sysUse:%d,\tdycUse:%d,\tresUse:%d.\n",
59 __entry->name, __entry->uptr_size, __entry->counter,
60 __entry->sys_size, __entry->sys_res_size, __entry->cam_sys_use,
61 __entry->cam_dyc_use, __entry->cam_res_use)
64 TRACE_EVENT(camera_debug,
66 TP_PROTO(const char *name, char *info, const int line),
68 TP_ARGS(name, info, line),
71 __array(char, name, 24)
72 __array(char, info, 24)
77 strscpy(__entry->name, name, 24);
78 strscpy(__entry->info, info, 24);
82 TP_printk("<%s>-<%d> %s\n", __entry->name, __entry->line,
86 TRACE_EVENT(ipu_cstate,
97 __entry->cstate = cstate;
100 TP_printk("cstate=%d", __entry->cstate)
103 TRACE_EVENT(ipu_pstate,
105 TP_PROTO(int freq, int util),
115 __entry->freq = freq;
116 __entry->util = util;
119 TP_printk("freq=%d util=%d", __entry->freq, __entry->util)
123 #undef TRACE_INCLUDE_PATH
124 #undef TRACE_INCLUDE_FILE
125 #define TRACE_INCLUDE_PATH .
126 #define TRACE_INCLUDE_FILE atomisp_trace_event
127 /* This part must be outside protection */
128 #include <trace/define_trace.h>