summaryrefslogtreecommitdiff
path: root/tools/perf/tests/code-reading.c
diff options
context:
space:
mode:
authorAthira Rajeev <atrajeev@linux.vnet.ibm.com>2023-09-28 13:22:12 +0530
committerNamhyung Kim <namhyung@kernel.org>2023-10-04 22:28:07 -0700
commit6be5d82862ee9b4e517dcfdfb064c2d671dbd45a (patch)
treeeec861867a820619696d8691b558bd42b52c267b /tools/perf/tests/code-reading.c
parent26a5262d30e1452071bcfe86725f2fe4e164db04 (diff)
downloadlinux-6be5d82862ee9b4e517dcfdfb064c2d671dbd45a.tar.gz
linux-6be5d82862ee9b4e517dcfdfb064c2d671dbd45a.tar.bz2
linux-6be5d82862ee9b4e517dcfdfb064c2d671dbd45a.zip
tools/perf: Add "is_kmod" to struct dso to check if it is kernel module
Update "struct dso" to include new member "is_kmod". This new field will determine if the file is a kernel module or not. To resolve the address from a sample, perf looks at the DSO maps. In case of address from a kernel module, there were some address found to be not resolved. This was observed while running perf test for "Object code reading". Though the ip falls beteen the start address of the loaded module (perf map->start ) and end address ( perf map->end), it was unresolved. This was happening because in some cases for kernel modules, address from sample points to stub instructions. To identify if the DSO is a kernel module, the new field "is_kmod" is added to "struct dso". Reported-by: Disha Goel <disgoel@linux.ibm.com> Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: kjain@linux.ibm.com Cc: maddy@linux.ibm.com Cc: disgoel@linux.vnet.ibm.com Cc: linuxppc-dev@lists.ozlabs.org Link: https://lore.kernel.org/r/20230928075213.84392-2-atrajeev@linux.vnet.ibm.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/tests/code-reading.c')
0 files changed, 0 insertions, 0 deletions