Skip to content
Snippets Groups Projects
Commit cf8c54a0 authored by Gopi Krishna Nedanuri's avatar Gopi Krishna Nedanuri
Browse files

lrdp_v2: Use correct flag to extract trace point name

Due to change in enum on 4.9 kernel, ftrace is not properly generated

Change-Id: Ief2e65b32d7f5dd49d00fa58e915a497b3535e25
parent 597341a8
No related branches found
No related tags found
No related merge requests found
......@@ -34,7 +34,6 @@ from sysregs import SysRegDump
MEMDUMPV2_MAGIC = 0x42445953
MAX_NUM_ENTRIES = 0x150
TRACE_EVENT_FL_TRACEPOINT = 0x40
class client(object):
MSM_DUMP_DATA_CPU_CTX = 0x00
......@@ -330,7 +329,10 @@ class DebugImage_v2():
class_offset = ram_dump.field_offset(self.event_call, 'class')
flags_offset = ram_dump.field_offset(self.event_call, 'flags')
flags = ram_dump.read_word(ftrace_list + flags_offset)
if ram_dump.kernel_version >= (4, 9):
TRACE_EVENT_FL_TRACEPOINT = 0x20
else:
TRACE_EVENT_FL_TRACEPOINT = 0x40
if (ram_dump.kernel_version >= (3, 18) and (flags & TRACE_EVENT_FL_TRACEPOINT)):
tp_offset = ram_dump.field_offset(self.event_call, 'tp')
tp_name_offset = ram_dump.field_offset('struct tracepoint', 'name')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment