Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf symbol: Simplify kernel module checking

In dso__load(), it checks if the dso is a kernel module by looking the
symtab type. Actually dso has 'is_kmod' field to check that easily and
dso__set_module_info() set the symtab type and the is_kmod bit. So it
should have the same result to check the is_kmod bit.

Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240621170528.608772-3-namhyung@kernel.org

+1 -4
+1 -4
tools/perf/util/symbol.c
··· 1817 1817 goto out; 1818 1818 } 1819 1819 1820 - kmod = dso__symtab_type(dso) == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE || 1821 - dso__symtab_type(dso) == DSO_BINARY_TYPE__SYSTEM_PATH_KMODULE_COMP || 1822 - dso__symtab_type(dso) == DSO_BINARY_TYPE__GUEST_KMODULE || 1823 - dso__symtab_type(dso) == DSO_BINARY_TYPE__GUEST_KMODULE_COMP; 1820 + kmod = dso__is_kmod(dso); 1824 1821 1825 1822 if (dso__kernel(dso) && !kmod) { 1826 1823 if (dso__kernel(dso) == DSO_SPACE__KERNEL)