summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDrew Richardson2014-04-23 04:42:07 -0500
committerJon Medhurst2014-04-24 09:23:19 -0500
commitadf5fae8808f09cc6cd95dd77d49904aa30cb250 (patch)
treee78ec0689ae4c9943fc67935bfcde31b0af742cc
parentb7d5d4453493920a30a4a872cefa6daeaa3fb925 (diff)
downloadarm-ds5-gator-adf5fae8808f09cc6cd95dd77d49904aa30cb250.tar.gz
arm-ds5-gator-adf5fae8808f09cc6cd95dd77d49904aa30cb250.tar.xz
arm-ds5-gator-adf5fae8808f09cc6cd95dd77d49904aa30cb250.zip
gator: Remove generic GPU tracepoint support
These tracepoints are not used by anything and removing them lets us avoid any rework required for the tracepoint API changes in Linux 3.15. Signed-off-by: Drew Richardson <drew.richardson@arm.com> Signed-off-by: Jon Medhurst <tixy@linaro.org>
-rw-r--r--driver/gator_marshaling.c2
-rw-r--r--driver/gator_trace_gpu.c38
-rw-r--r--driver/gator_trace_gpu.h79
3 files changed, 9 insertions, 110 deletions
diff --git a/driver/gator_marshaling.c b/driver/gator_marshaling.c
index fd413ad..18c890d 100644
--- a/driver/gator_marshaling.c
+++ b/driver/gator_marshaling.c
@@ -233,6 +233,7 @@ static void marshal_event_single(int core, int key, int value)
233} 233}
234#endif 234#endif
235 235
236#if defined(MALI_SUPPORT)
236static void marshal_sched_gpu_start(int unit, int core, int tgid, int pid) 237static void marshal_sched_gpu_start(int unit, int core, int tgid, int pid)
237{ 238{
238 unsigned long cpu = get_physical_cpu(), flags; 239 unsigned long cpu = get_physical_cpu(), flags;
@@ -276,6 +277,7 @@ static void marshal_sched_gpu_stop(int unit, int core)
276 // Check and commit; commit is set to occur once buffer is 3/4 full 277 // Check and commit; commit is set to occur once buffer is 3/4 full
277 buffer_check(cpu, GPU_TRACE_BUF, time); 278 buffer_check(cpu, GPU_TRACE_BUF, time);
278} 279}
280#endif
279 281
280static void marshal_sched_trace_start(int tgid, int pid, int cookie) 282static void marshal_sched_trace_start(int tgid, int pid, int cookie)
281{ 283{
diff --git a/driver/gator_trace_gpu.c b/driver/gator_trace_gpu.c
index 6332098..6afa548 100644
--- a/driver/gator_trace_gpu.c
+++ b/driver/gator_trace_gpu.c
@@ -23,8 +23,6 @@
23#endif 23#endif
24#endif 24#endif
25 25
26#include "gator_trace_gpu.h"
27
28/* 26/*
29 * Taken from MALI_PROFILING_EVENT_TYPE_* items in Mali DDK. 27 * Taken from MALI_PROFILING_EVENT_TYPE_* items in Mali DDK.
30 */ 28 */
@@ -37,7 +35,6 @@
37/* Note whether tracepoints have been registered */ 35/* Note whether tracepoints have been registered */
38static int mali_timeline_trace_registered; 36static int mali_timeline_trace_registered;
39static int mali_job_slots_trace_registered; 37static int mali_job_slots_trace_registered;
40static int gpu_trace_registered;
41 38
42enum { 39enum {
43 GPU_UNIT_NONE = 0, 40 GPU_UNIT_NONE = 0,
@@ -50,6 +47,8 @@ enum {
50#define MALI_4xx (0x0b07) 47#define MALI_4xx (0x0b07)
51#define MALI_T6xx (0x0056) 48#define MALI_T6xx (0x0056)
52 49
50#if defined(MALI_SUPPORT)
51
53struct mali_gpu_job { 52struct mali_gpu_job {
54 int count; 53 int count;
55 int last_tgid; 54 int last_tgid;
@@ -113,6 +112,7 @@ static void mali_gpu_stop(int unit, int core)
113 marshal_sched_gpu_start(unit, core, last_tgid, last_pid/*, last_job_id*/); 112 marshal_sched_gpu_start(unit, core, last_tgid, last_pid/*, last_job_id*/);
114 } 113 }
115} 114}
115#endif
116 116
117#if defined(MALI_SUPPORT) && (MALI_SUPPORT != MALI_T6xx) 117#if defined(MALI_SUPPORT) && (MALI_SUPPORT != MALI_T6xx)
118#include "gator_events_mali_4xx.h" 118#include "gator_events_mali_4xx.h"
@@ -232,16 +232,6 @@ GATOR_DEFINE_PROBE(mali_job_slots_event, TP_PROTO(unsigned int event_id, unsigne
232} 232}
233#endif 233#endif
234 234
235GATOR_DEFINE_PROBE(gpu_activity_start, TP_PROTO(int gpu_unit, int gpu_core, struct task_struct *p))
236{
237 mali_gpu_enqueue(gpu_unit, gpu_core, (int)p->tgid, (int)p->pid, 0);
238}
239
240GATOR_DEFINE_PROBE(gpu_activity_stop, TP_PROTO(int gpu_unit, int gpu_core))
241{
242 mali_gpu_stop(gpu_unit, gpu_core);
243}
244
245static int gator_trace_gpu_start(void) 235static int gator_trace_gpu_start(void)
246{ 236{
247 /* 237 /*
@@ -249,8 +239,10 @@ static int gator_trace_gpu_start(void)
249 * Absence of gpu trace points is not an error 239 * Absence of gpu trace points is not an error
250 */ 240 */
251 241
242#if defined(MALI_SUPPORT)
252 memset(&mali_gpu_jobs, 0, sizeof(mali_gpu_jobs)); 243 memset(&mali_gpu_jobs, 0, sizeof(mali_gpu_jobs));
253 gpu_trace_registered = mali_timeline_trace_registered = mali_job_slots_trace_registered = 0; 244#endif
245 mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
254 246
255#if defined(MALI_SUPPORT) && (MALI_SUPPORT != MALI_T6xx) 247#if defined(MALI_SUPPORT) && (MALI_SUPPORT != MALI_T6xx)
256 if (!GATOR_REGISTER_TRACE(mali_timeline_event)) { 248 if (!GATOR_REGISTER_TRACE(mali_timeline_event)) {
@@ -264,17 +256,6 @@ static int gator_trace_gpu_start(void)
264 } 256 }
265#endif 257#endif
266 258
267 if (!mali_timeline_trace_registered) {
268 if (GATOR_REGISTER_TRACE(gpu_activity_start)) {
269 return 0;
270 }
271 if (GATOR_REGISTER_TRACE(gpu_activity_stop)) {
272 GATOR_UNREGISTER_TRACE(gpu_activity_start);
273 return 0;
274 }
275 gpu_trace_registered = 1;
276 }
277
278 return 0; 259 return 0;
279} 260}
280 261
@@ -292,10 +273,5 @@ static void gator_trace_gpu_stop(void)
292 } 273 }
293#endif 274#endif
294 275
295 if (gpu_trace_registered) { 276 mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
296 GATOR_UNREGISTER_TRACE(gpu_activity_stop);
297 GATOR_UNREGISTER_TRACE(gpu_activity_start);
298 }
299
300 gpu_trace_registered = mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
301} 277}
diff --git a/driver/gator_trace_gpu.h b/driver/gator_trace_gpu.h
deleted file mode 100644
index 5113d45..0000000
--- a/driver/gator_trace_gpu.h
+++ /dev/null
@@ -1,79 +0,0 @@
1/**
2 * Copyright (C) ARM Limited 2010-2014. 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 */
8
9#undef TRACE_GPU
10#define TRACE_GPU gpu
11
12#if !defined(_TRACE_GPU_H)
13#define _TRACE_GPU_H
14
15#include <linux/tracepoint.h>
16
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 */
25
26/*
27 * Tracepoint for calling GPU unit start activity on core
28 */
29TRACE_EVENT(gpu_activity_start,
30
31 TP_PROTO(int gpu_unit, int gpu_core, struct task_struct *p),
32
33 TP_ARGS(gpu_unit, gpu_core, p),
34
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 ),
41
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 ),
48
49 TP_printk("unit=%d core=%d comm=%s pid=%d",
50 __entry->gpu_unit, __entry->gpu_core, __entry->comm,
51 __entry->pid)
52 );
53
54/*
55 * Tracepoint for calling GPU unit stop activity on core
56 */
57TRACE_EVENT(gpu_activity_stop,
58
59 TP_PROTO(int gpu_unit, int gpu_core),
60
61 TP_ARGS(gpu_unit, gpu_core),
62
63 TP_STRUCT__entry(
64 __field(int, gpu_unit)
65 __field(int, gpu_core)
66 ),
67
68 TP_fast_assign(
69 __entry->gpu_unit = gpu_unit;
70 __entry->gpu_core = gpu_core;
71 ),
72
73 TP_printk("unit=%d core=%d", __entry->gpu_unit, __entry->gpu_core)
74 );
75
76#endif /* _TRACE_GPU_H */
77
78/* This part must be outside protection */
79#include <trace/define_trace.h>