mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: kgsl: Add a ftrace event for register writes
It is interesting to know when and how we program the hardware so add a tracepoint to monitor register writes. Register reads are not traced since they are done much more frequently and are somewhat less interesting from a debug perspective. Change-Id: Ic0dedbad8ee85f154b9ba8731fe2c14603351243 Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Sakshi Agrawal <sakshia@codeaurora.org>
This commit is contained in:
parent
b654d7af17
commit
2dd2275c0d
2 changed files with 28 additions and 0 deletions
|
@ -30,6 +30,7 @@
|
|||
#include "kgsl_cffdump.h"
|
||||
#include "kgsl_sharedmem.h"
|
||||
#include "kgsl_iommu.h"
|
||||
#include "kgsl_trace.h"
|
||||
|
||||
#include "adreno.h"
|
||||
#include "adreno_pm4types.h"
|
||||
|
@ -2545,6 +2546,8 @@ void adreno_regwrite(struct kgsl_device *device, unsigned int offsetwords,
|
|||
if (!in_interrupt())
|
||||
kgsl_pre_hwaccess(device);
|
||||
|
||||
trace_kgsl_regwrite(device, offsetwords, value);
|
||||
|
||||
kgsl_cffdump_regwrite(device->id, offsetwords << 2, value);
|
||||
reg = (unsigned int *)(device->reg_virt + (offsetwords << 2));
|
||||
|
||||
|
|
|
@ -608,6 +608,31 @@ TRACE_EVENT(kgsl_mmu_pagefault,
|
|||
)
|
||||
);
|
||||
|
||||
TRACE_EVENT(kgsl_regwrite,
|
||||
|
||||
TP_PROTO(struct kgsl_device *device, unsigned int offset,
|
||||
unsigned int value),
|
||||
|
||||
TP_ARGS(device, offset, value),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__string(device_name, device->name)
|
||||
__field(unsigned int, offset)
|
||||
__field(unsigned int, value)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(device_name, device->name);
|
||||
__entry->offset = offset;
|
||||
__entry->value = value;
|
||||
),
|
||||
|
||||
TP_printk(
|
||||
"d_name=%s reg=%x value=%x",
|
||||
__get_str(device_name), __entry->offset, __entry->value
|
||||
)
|
||||
);
|
||||
|
||||
#endif /* _KGSL_TRACE_H */
|
||||
|
||||
/* This part must be outside protection */
|
||||
|
|
Loading…
Reference in a new issue