@@ -187,6 +187,7 @@ def process_event(param_dict):
dso_start = get_optional(param_dict, "dso_map_start")
dso_end = get_optional(param_dict, "dso_map_end")
symbol = get_optional(param_dict, "symbol")
+ map_pgoff = get_optional(param_dict, "map_pgoff")
cpu = sample["cpu"]
ip = sample["ip"]
@@ -250,13 +251,25 @@ def process_event(param_dict):
return
if (start_addr < int(dso_start) or start_addr > int(dso_end)):
- print("Start address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (start_addr, int(dso_start), int(dso_end), dso))
+ if (options.verbose == True):
+ print("Start address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (start_addr, int(dso_start), int(dso_end), dso))
return
if (stop_addr < int(dso_start) or stop_addr > int(dso_end)):
- print("Stop address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (stop_addr, int(dso_start), int(dso_end), dso))
+ if (options.verbose == True):
+ print("Stop address 0x%x is out of range [ 0x%x .. 0x%x ] for dso %s" % (stop_addr, int(dso_start), int(dso_end), dso))
return
+ if map_pgoff != None and map_pgoff != '[unknown]':
+ if (dso == "[kernel.kallsyms]"):
+ dso_vm_start = 0
+ map_pgoff = '[unknown]'
+ else:
+ dso_vm_start = int(dso_start)
+ start_addr += map_pgoff
+ stop_addr += map_pgoff
+ map_pgoff = '[unknown]'
+
if (options.objdump_name != None):
# It doesn't need to decrease virtual memory offset for disassembly
# for kernel dso and executable file dso, so in this case we set