diff options
| author | Ingo Molnar <mingo@kernel.org> | 2024-02-14 12:45:07 +0300 | 
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2024-02-14 12:45:07 +0300 | 
| commit | 03c11eb3b16dc0058589751dfd91f254be2be613 (patch) | |
| tree | e5f2889212fec0bb0babdce9abd781ab487e246a /tools/perf/scripts/python/arm-cs-trace-disasm.py | |
| parent | de8c6a352131f642b82474abe0cbb5dd26a7e081 (diff) | |
| parent | 841c35169323cd833294798e58b9bf63fa4fa1de (diff) | |
| download | linux-03c11eb3b16dc0058589751dfd91f254be2be613.tar.xz | |
Merge tag 'v6.8-rc4' into x86/percpu, to resolve conflicts and refresh the branch
Conflicts:
	arch/x86/include/asm/percpu.h
	arch/x86/include/asm/text-patching.h
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/arm-cs-trace-disasm.py')
| -rwxr-xr-x | tools/perf/scripts/python/arm-cs-trace-disasm.py | 30 | 
1 files changed, 16 insertions, 14 deletions
| diff --git a/tools/perf/scripts/python/arm-cs-trace-disasm.py b/tools/perf/scripts/python/arm-cs-trace-disasm.py index d59ff53f1d94..d973c2baed1c 100755 --- a/tools/perf/scripts/python/arm-cs-trace-disasm.py +++ b/tools/perf/scripts/python/arm-cs-trace-disasm.py @@ -45,8 +45,8 @@ parser = OptionParser(option_list=option_list)  # Initialize global dicts and regular expression  disasm_cache = dict()  cpu_data = dict() -disasm_re = re.compile("^\s*([0-9a-fA-F]+):") -disasm_func_re = re.compile("^\s*([0-9a-fA-F]+)\s.*:") +disasm_re = re.compile(r"^\s*([0-9a-fA-F]+):") +disasm_func_re = re.compile(r"^\s*([0-9a-fA-F]+)\s.*:")  cache_size = 64*1024  glb_source_file_name	= None @@ -188,6 +188,17 @@ def process_event(param_dict):  	dso_end = get_optional(param_dict, "dso_map_end")  	symbol = get_optional(param_dict, "symbol") +	cpu = sample["cpu"] +	ip = sample["ip"] +	addr = sample["addr"] + +	# Initialize CPU data if it's empty, and directly return back +	# if this is the first tracing event for this CPU. +	if (cpu_data.get(str(cpu) + 'addr') == None): +		cpu_data[str(cpu) + 'addr'] = addr +		return + +  	if (options.verbose == True):  		print("Event type: %s" % name)  		print_sample(sample) @@ -209,16 +220,6 @@ def process_event(param_dict):  	if (name[0:8] != "branches"):  		return -	cpu = sample["cpu"] -	ip = sample["ip"] -	addr = sample["addr"] - -	# Initialize CPU data if it's empty, and directly return back -	# if this is the first tracing event for this CPU. -	if (cpu_data.get(str(cpu) + 'addr') == None): -		cpu_data[str(cpu) + 'addr'] = addr -		return -  	# The format for packet is:  	#  	#		  +------------+------------+------------+ @@ -258,8 +259,9 @@ def process_event(param_dict):  	if (options.objdump_name != None):  		# It doesn't need to decrease virtual memory offset for disassembly -		# for kernel dso, so in this case we set vm_start to zero. -		if (dso == "[kernel.kallsyms]"): +		# for kernel dso and executable file dso, so in this case we set +		# vm_start to zero. +		if (dso == "[kernel.kallsyms]" or dso_start == 0x400000):  			dso_vm_start = 0  		else:  			dso_vm_start = int(dso_start) | 
