dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/scripts
Lai Jiangshan b478b782e1 kallsyms, tracing: output more proper symbol name
Impact: bugfix, output more reliable symbol lookup result

Debug tools(dump_stack(), ftrace...) are like to print out symbols.
But it is always print out the first aliased symbol.(Aliased symbols
are symbols with the same address), and the first aliased symbol is
sometime not proper.

 # echo function_graph > current_tracer
 # cat trace
......
 1)   1.923 us    |    select_nohz_load_balancer();
 1) + 76.692 us   |  }
 1)               |  default_idle() {
 1)   ==========> |    __irqentry_text_start() {
 1)   0.000 us    |      native_apic_mem_write();
 1)               |      irq_enter() {
 1)   0.000 us    |        idle_cpu();
 1)               |        tick_check_idle() {
 1)   0.000 us    |          tick_check_oneshot_broadcast();
 1)               |          tick_nohz_stop_idle() {
......

It's very embarrassing, it ouputs "__irqentry_text_start()",
actually, it should output "smp_apic_timer_interrupt()".
(these two symbol are the same address, but "__irqentry_text_start"
is deemed to the first aliased symbol by scripts/kallsyms)

This patch puts symbols like "__irqentry_text_start" to the second
aliased symbols. And a more proper symbol name becomes the first.

Aliased symbols mostly come from linker script. The solution is
guessing "is this symbol defined in linker script", the symbols
defined in linker script will not become the first aliased symbol.

And if symbols are found to be equal in this "linker script provided"
criteria, symbols are sorted by the number of prefix underscores.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Paulo Marques <pmarques@grupopie.com>
LKML-Reference: <49BA06E2.7080807@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-03-14 09:55:04 +01:00
..
basic Update .gitignore files for generated targets 2008-10-20 11:24:31 -07:00
genksyms Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
kconfig kconfig: improve error messages for bad source statements 2009-01-02 20:43:22 +01:00
ksymoops Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mod Merge branch 'linus' into x86/apic 2009-02-22 20:05:19 +01:00
package kbuild: fix 'make rpm' when CONFIG_LOCALVERSION_AUTO=y and using SCM tree 2009-03-07 13:55:38 +01:00
rt-tester [PATCH] rtmutex: Modify rtmutex-tester to test the setscheduler propagation 2006-06-27 17:32:47 -07:00
selinux SELinux: add gitignore file for mdp script 2008-09-05 21:43:38 +10:00
trace tracing: add "power-tracer": C/P state tracer to help power optimization 2008-11-26 08:29:32 +01:00
tracing ftrace: add a script to produce a hierarchical view of a function trace 2008-10-27 11:00:07 +01:00
.gitignore fix modules_install via NFS 2009-01-07 21:44:20 +01:00
Kbuild.include kbuild: use KECHO convenience echo 2008-12-03 21:32:01 +01:00
Lindent scripts/Lindent: support gnu indent v2.2.10 2008-04-29 08:06:04 -07:00
Makefile fix modules_install via NFS 2009-01-07 21:44:20 +01:00
Makefile.build Merge branches 'tracing/ftrace', 'tracing/kmemtrace' and 'linus' into tracing/core 2009-02-03 06:25:38 +01:00
Makefile.clean kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.fwinst firmware: silence __fw_modbuild and __fw_modinst 'Nothing to be done' messages 2008-08-02 07:52:29 +01:00
Makefile.headersinst kbuild: install all headers when arch is changed 2008-07-25 22:12:18 +02:00
Makefile.host kbuild: fix some minor typoes 2008-04-25 20:18:48 +02:00
Makefile.lib bzip2/lzma: handle failures from bzip2 and lzma correctly 2009-01-04 15:53:35 -08:00
Makefile.modinst Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
Makefile.modpost kbuild: fix KBUILD_EXTRA_SYMBOLS 2008-10-29 22:02:09 +01:00
bin2c.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bin_size bzip2/lzma: library support for gzip, bzip2 and lzma decompression 2009-01-04 15:53:34 -08:00
binoffset.c update the email address of Randy Dunlap 2006-01-03 13:37:51 +01:00
bloat-o-meter fix bloat-o-meter for ppc64 2007-12-17 19:28:17 -08:00
bootgraph.pl bootgraph: fix for use with dot symbols 2009-02-15 12:50:08 +01:00
checkincludes.pl Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
checkkconfigsymbols.sh kbuild: script to check for undefined Kconfig symbols 2007-10-12 21:13:50 +02:00
checkpatch.pl checkpatch: version 0.28 2009-02-27 16:26:22 -08:00
checkstack.pl sparc: Add checkstack support 2008-10-22 21:53:49 -07:00
checksyscalls.sh scripts/checksyscalls.sh: fix for non-gnu sed 2008-10-29 22:02:08 +01:00
checkversion.pl kbuild: introduce utsrelease.h 2006-07-03 23:30:54 +02:00
cleanfile scripts: Make cleanfile/cleanpatch warn about long lines 2007-07-16 21:15:50 +02:00
cleanpatch scripts: Make cleanfile/cleanpatch warn about long lines 2007-07-16 21:15:50 +02:00
config kbuild: print usage with no arguments in scripts/config 2009-01-14 21:40:49 +01:00
conmakehash.c [PATCH] kbuild: signed char fixes for scripts 2005-07-27 22:27:08 +02:00
decodecode scripts: improve the decodecode script 2008-12-03 22:36:39 +01:00
diffconfig kconfig: add diffconfig utility 2008-07-25 22:12:41 +02:00
export_report.pl kbuild: fix perl usage in export_report.pl 2007-10-12 21:13:50 +02:00
extract-ikconfig remove bashisms from scripts/extract-ikconfig 2008-12-03 21:32:02 +01:00
gcc-version.sh kbuild: fix buglet in gcc-version.sh 2008-01-28 23:14:36 +01:00
gcc-x86_32-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gcc-x86_64-has-stack-protector.sh stackprotector: fix multi-word cross-builds 2009-02-11 12:17:29 +01:00
gen_initramfs_list.sh bzip2/lzma: don't leave empty files around on failure 2009-02-19 13:39:21 -08:00
headerdep.pl kbuild: add headerdep used to detect inclusion cycles in header files 2008-12-18 20:18:04 +01:00
headers.sh kbuild: prepare headers_* for arch/$ARCH/include 2008-07-25 22:12:33 +02:00
headers_check.pl kbuild: drop check for CONFIG_ in headers_check 2009-01-31 00:36:15 +01:00
headers_install.pl kbuild: in headers_install autoconvert asm/inline/volatile to __xxx__ 2009-01-02 20:43:24 +01:00
ihex2fw.c fix modules_install via NFS 2009-01-07 21:44:20 +01:00
kallsyms.c kallsyms, tracing: output more proper symbol name 2009-03-14 09:55:04 +01:00
kernel-doc kernel-doc: fix syscall wrapper processing 2009-02-11 14:25:36 -08:00
makelst kbuild: introduce ccflags-y, asflags-y and ldflags-y 2007-10-15 22:25:06 +02:00
markup_oops.pl scripts: add x86 64 bit support to the markup_oops.pl script 2009-02-15 12:50:10 +01:00
mkcompile_h kbuild: kill output in silent mode of mkcompile_h 2008-12-03 21:32:00 +01:00
mkmakefile kbuild: teach mkmakfile to be silent 2008-12-03 21:32:02 +01:00
mksysmap Revert "kbuild: strip generated symbols from *.ko" 2009-01-14 21:38:20 +01:00
mkuboot.sh kbuild/mkuboot.sh: allow spaces in CROSS_COMPILE 2007-05-02 20:58:10 +02:00
mkversion Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namespace.pl x86: fixup the x86 namespace change in scripts/namespace.pl 2007-10-11 17:56:02 +02:00
patch-kernel bugfix for scripts/patch-kernel in 2.6 sublevel stepping 2008-08-06 22:11:33 +02:00
pnmtologo.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
profile2linkerlist.pl [PATCH] x86_64: Basic reorder infrastructure 2006-03-25 09:10:56 -08:00
recordmcount.pl ftrace: test for running of recordmcount.pl twice on an object 2009-01-18 20:15:26 +01:00
setlocalversion kbuild,setlocalversion: shorten the make time when using svn 2009-02-15 12:50:07 +01:00
show_delta kbuild: fix mode of checkstack.pl and other files. 2006-04-11 13:37:07 +02:00
tags.sh kbuild: add sys_* entries for syscalls in tags 2009-02-15 12:50:09 +01:00
unifdef.c kbuild: fix C libary confusion in unifdef.c due to getline() 2009-03-07 13:31:29 +01:00
ver_linux kbuild: scripts/ver_linux: don't set PATH 2008-07-31 23:36:54 +02:00