aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2014-04-23 10:42:07 +0100
committerJon Medhurst <tixy@linaro.org>2014-04-24 15:23:19 +0100
commitadf5fae8808f09cc6cd95dd77d49904aa30cb250 (patch)
treee78ec0689ae4c9943fc67935bfcde31b0af742cc
parentb7d5d4453493920a30a4a872cefa6daeaa3fb925 (diff)
downloadgator-adf5fae8808f09cc6cd95dd77d49904aa30cb250.tar.gz
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)
}
#endif
+#if defined(MALI_SUPPORT)
static void marshal_sched_gpu_start(int unit, int core, int tgid, int pid)
{
unsigned long cpu = get_physical_cpu(), flags;
@@ -276,6 +277,7 @@ static void marshal_sched_gpu_stop(int unit, int core)
// Check and commit; commit is set to occur once buffer is 3/4 full
buffer_check(cpu, GPU_TRACE_BUF, time);
}
+#endif
static void marshal_sched_trace_start(int tgid, int pid, int cookie)
{
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 @@
#endif
#endif
-#include "gator_trace_gpu.h"
-
/*
* Taken from MALI_PROFILING_EVENT_TYPE_* items in Mali DDK.
*/
@@ -37,7 +35,6 @@
/* Note whether tracepoints have been registered */
static int mali_timeline_trace_registered;
static int mali_job_slots_trace_registered;
-static int gpu_trace_registered;
enum {
GPU_UNIT_NONE = 0,
@@ -50,6 +47,8 @@ enum {
#define MALI_4xx (0x0b07)
#define MALI_T6xx (0x0056)
+#if defined(MALI_SUPPORT)
+
struct mali_gpu_job {
int count;
int last_tgid;
@@ -113,6 +112,7 @@ static void mali_gpu_stop(int unit, int core)
marshal_sched_gpu_start(unit, core, last_tgid, last_pid/*, last_job_id*/);
}
}
+#endif
#if defined(MALI_SUPPORT) && (MALI_SUPPORT != MALI_T6xx)
#include "gator_events_mali_4xx.h"
@@ -232,16 +232,6 @@ GATOR_DEFINE_PROBE(mali_job_slots_event, TP_PROTO(unsigned int event_id, unsigne
}
#endif
-GATOR_DEFINE_PROBE(gpu_activity_start, TP_PROTO(int gpu_unit, int gpu_core, struct task_struct *p))
-{
- mali_gpu_enqueue(gpu_unit, gpu_core, (int)p->tgid, (int)p->pid, 0);
-}
-
-GATOR_DEFINE_PROBE(gpu_activity_stop, TP_PROTO(int gpu_unit, int gpu_core))
-{
- mali_gpu_stop(gpu_unit, gpu_core);
-}
-
static int gator_trace_gpu_start(void)
{
/*
@@ -249,8 +239,10 @@ static int gator_trace_gpu_start(void)
* Absence of gpu trace points is not an error
*/
+#if defined(MALI_SUPPORT)
memset(&mali_gpu_jobs, 0, sizeof(mali_gpu_jobs));
- gpu_trace_registered = mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
+#endif
+ mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
#if defined(MALI_SUPPORT) && (MALI_SUPPORT != MALI_T6xx)
if (!GATOR_REGISTER_TRACE(mali_timeline_event)) {
@@ -264,17 +256,6 @@ static int gator_trace_gpu_start(void)
}
#endif
- if (!mali_timeline_trace_registered) {
- if (GATOR_REGISTER_TRACE(gpu_activity_start)) {
- return 0;
- }
- if (GATOR_REGISTER_TRACE(gpu_activity_stop)) {
- GATOR_UNREGISTER_TRACE(gpu_activity_start);
- return 0;
- }
- gpu_trace_registered = 1;
- }
-
return 0;
}
@@ -292,10 +273,5 @@ static void gator_trace_gpu_stop(void)
}
#endif
- if (gpu_trace_registered) {
- GATOR_UNREGISTER_TRACE(gpu_activity_stop);
- GATOR_UNREGISTER_TRACE(gpu_activity_start);
- }
-
- gpu_trace_registered = mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
+ mali_timeline_trace_registered = mali_job_slots_trace_registered = 0;
}
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 @@
-/**
- * Copyright (C) ARM Limited 2010-2014. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#undef TRACE_GPU
-#define TRACE_GPU gpu
-
-#if !defined(_TRACE_GPU_H)
-#define _TRACE_GPU_H
-
-#include <linux/tracepoint.h>
-
-/*
- * UNIT - the GPU processor type
- * 1 = Vertex Processor
- * 2 = Fragment Processor
- *
- * CORE - the GPU processor core number
- * this is not the CPU core number
- */
-
-/*
- * Tracepoint for calling GPU unit start activity on core
- */
-TRACE_EVENT(gpu_activity_start,
-
- TP_PROTO(int gpu_unit, int gpu_core, struct task_struct *p),
-
- TP_ARGS(gpu_unit, gpu_core, p),
-
- TP_STRUCT__entry(
- __field(int, gpu_unit)
- __field(int, gpu_core)
- __array(char, comm, TASK_COMM_LEN)
- __field(pid_t, pid)
- ),
-
- TP_fast_assign(
- __entry->gpu_unit = gpu_unit;
- __entry->gpu_core = gpu_core;
- memcpy(__entry->comm, p->comm, TASK_COMM_LEN);
- __entry->pid = p->pid;
- ),
-
- TP_printk("unit=%d core=%d comm=%s pid=%d",
- __entry->gpu_unit, __entry->gpu_core, __entry->comm,
- __entry->pid)
- );
-
-/*
- * Tracepoint for calling GPU unit stop activity on core
- */
-TRACE_EVENT(gpu_activity_stop,
-
- TP_PROTO(int gpu_unit, int gpu_core),
-
- TP_ARGS(gpu_unit, gpu_core),
-
- TP_STRUCT__entry(
- __field(int, gpu_unit)
- __field(int, gpu_core)
- ),
-
- TP_fast_assign(
- __entry->gpu_unit = gpu_unit;
- __entry->gpu_core = gpu_core;
- ),
-
- TP_printk("unit=%d core=%d", __entry->gpu_unit, __entry->gpu_core)
- );
-
-#endif /* _TRACE_GPU_H */
-
-/* This part must be outside protection */
-#include <trace/define_trace.h>