]> 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-2012. 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, __entry->pid)
51 );
53 /*
54  * Tracepoint for calling GPU unit stop activity on core
55  */
56 TRACE_EVENT(gpu_activity_stop,
58         TP_PROTO(int gpu_unit, int gpu_core),
60         TP_ARGS(gpu_unit, gpu_core),
62         TP_STRUCT__entry(
63                 __field(        int,    gpu_unit                )
64                 __field(        int,    gpu_core                )
65         ),
67         TP_fast_assign(
68                 __entry->gpu_unit       = gpu_unit;
69                 __entry->gpu_core       = gpu_core;
70         ),
72         TP_printk("unit=%d core=%d",
73                 __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>