]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/arm-ds5-gator.git/blob - driver/gator_trace_gpu.h
gator-driver: Default GATOR_MALI_INTERFACE_STYLE to '2'
[android-sdk/arm-ds5-gator.git] / driver / gator_trace_gpu.h
1 /**
2  * Copyright (C) ARM Limited 2010-2013. All rights reserved.
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  */
9 #undef TRACE_GPU
10 #define TRACE_GPU gpu
12 #if !defined(_TRACE_GPU_H)
13 #define _TRACE_GPU_H
15 #include <linux/tracepoint.h>
17 /*
18  * UNIT - the GPU processor type
19  *  1 = Vertex Processor
20  *  2 = Fragment Processor
21  *
22  * CORE - the GPU processor core number
23  *  this is not the CPU core number
24  */
26 /*
27  * Tracepoint for calling GPU unit start activity on core
28  */
29 TRACE_EVENT(gpu_activity_start,
31             TP_PROTO(int gpu_unit, int gpu_core, struct task_struct *p),
33             TP_ARGS(gpu_unit, gpu_core, p),
35             TP_STRUCT__entry(
36                              __field(int, gpu_unit)
37                              __field(int, gpu_core)
38                              __array(char, comm, TASK_COMM_LEN)
39                              __field(pid_t, pid)
40             ),
42             TP_fast_assign(
43                            __entry->gpu_unit = gpu_unit;
44                            __entry->gpu_core = gpu_core;
45                            memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
46                            __entry->pid = p->pid;
47             ),
49             TP_printk("unit=%d core=%d comm=%s pid=%d",
50                       __entry->gpu_unit, __entry->gpu_core, __entry->comm,
51                       __entry->pid)
52     );
54 /*
55  * Tracepoint for calling GPU unit stop activity on core
56  */
57 TRACE_EVENT(gpu_activity_stop,
59             TP_PROTO(int gpu_unit, int gpu_core),
61             TP_ARGS(gpu_unit, gpu_core),
63             TP_STRUCT__entry(
64                              __field(int, gpu_unit)
65                              __field(int, gpu_core)
66             ),
68             TP_fast_assign(
69                            __entry->gpu_unit = gpu_unit;
70                            __entry->gpu_core = gpu_core;
71             ),
73             TP_printk("unit=%d core=%d", __entry->gpu_unit, __entry->gpu_core)
74     );
76 #endif /* _TRACE_GPU_H */
78 /* This part must be outside protection */
79 #include <trace/define_trace.h>