msm: kgsl: Add the event callback symbol to GPU event tracepoints

Print the callback function symbol name in GPU event register
and fire trace events.  This makes it easier to debug which event
is being registered/fired.

Change-Id: Ic0dedbad4be4e4179c820af6119786c57d12e13f
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Carter Cooper <ccooper@codeaurora.org>
This commit is contained in:
Carter Cooper 2013-07-26 16:25:54 -06:00 committed by Iliyan Malchev
parent 1011c608ab
commit ccf3f3a551
2 changed files with 15 additions and 13 deletions

View file

@ -49,7 +49,7 @@ static inline void _do_signal_event(struct kgsl_device *device,
int id = event->context ? event->context->id : KGSL_MEMSTORE_GLOBAL;
trace_kgsl_fire_event(id, timestamp, type, jiffies - event->created,
(unsigned long) event->func);
event->func);
if (event->func)
event->func(device, event->priv, id, timestamp, type);
@ -236,7 +236,7 @@ int kgsl_add_event(struct kgsl_device *device, u32 id, u32 ts,
*/
if (timestamp_cmp(cur_ts, ts) >= 0) {
trace_kgsl_fire_event(id, cur_ts, ts, 0, (unsigned long) func);
trace_kgsl_fire_event(id, cur_ts, ts, 0, func);
func(device, priv, id, ts, KGSL_EVENT_TIMESTAMP_RETIRED);
kgsl_context_put(context);
@ -267,7 +267,7 @@ int kgsl_add_event(struct kgsl_device *device, u32 id, u32 ts,
event->owner = owner;
event->created = jiffies;
trace_kgsl_register_event(id, ts);
trace_kgsl_register_event(id, ts, func);
/* Add the event to either the owning context or the global list */

View file

@ -730,32 +730,33 @@ TRACE_EVENT(kgsl_regwrite,
);
TRACE_EVENT(kgsl_register_event,
TP_PROTO(unsigned int id, unsigned int timestamp),
TP_ARGS(id, timestamp),
TP_PROTO(unsigned int id, unsigned int timestamp, void *func),
TP_ARGS(id, timestamp, func),
TP_STRUCT__entry(
__field(unsigned int, id)
__field(unsigned int, timestamp)
__field(void *, func)
),
TP_fast_assign(
__entry->id = id;
__entry->timestamp = timestamp;
__entry->func = func;
),
TP_printk(
"ctx=%u ts=%u",
__entry->id, __entry->timestamp)
"ctx=%u ts=%u cb=%pF",
__entry->id, __entry->timestamp, __entry->func)
);
TRACE_EVENT(kgsl_fire_event,
TP_PROTO(unsigned int id, unsigned int ts,
unsigned int type, unsigned int age,
unsigned long func),
unsigned int type, unsigned int age, void *func),
TP_ARGS(id, ts, type, age, func),
TP_STRUCT__entry(
__field(unsigned int, id)
__field(unsigned int, ts)
__field(unsigned int, type)
__field(unsigned int, age)
__field(unsigned long, func)
__field(void *, func)
),
TP_fast_assign(
__entry->id = id;
@ -765,9 +766,10 @@ TRACE_EVENT(kgsl_fire_event,
__entry->func = func;
),
TP_printk(
"ctx=%d ts=%d type=%d age=%u func=%pF",
__entry->id, __entry->ts, __entry->type, __entry->age,
(void *) __entry->func)
"ctx=%u ts=%u type=%s age=%u cb=%pF",
__entry->id, __entry->ts,
__print_symbolic(__entry->type, KGSL_EVENT_TYPES),
__entry->age, __entry->func)
);
TRACE_EVENT(kgsl_active_count,