public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH V6 1/8] perf tools: validate kcore module addresses
@ 2013-10-11 18:28 Arnaldo Carvalho de Melo
  2013-10-11 18:37 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Arnaldo Carvalho de Melo @ 2013-10-11 18:28 UTC (permalink / raw)
  To: Adrian Hunter
  Cc: Peter Zijlstra, linux-kernel, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Stephane Eranian

Em Wed, Oct 09, 2013 at 03:01:11PM +0300, Adrian Hunter escreveu:
> -static bool kcore_filename_from_kallsyms_filename(char *kcore_filename,
> -						  const char *kallsyms_filename)
> +static bool filename_from_kallsyms_filename(char *filename,
> +					    const char *basename,
> +					    const char *kallsyms_filename)

In Fedora12:

  CC       /tmp/build/perf/util/symbol.o
cc1: warnings being treated as errors
util/symbol.c: In function ‘filename_from_kallsyms_filename’:
util/symbol.c:937: error: declaration of ‘__xpg_basename’ shadows a
global declaration
/usr/include/libgen.h:35: error: shadowed declaration is here
make[1]: *** [/tmp/build/perf/util/symbol.o] Error 1
make: *** [install] Error 2
make: Leaving directory `/home/acme/git/linux/tools/perf'
[acme@fedora12 linux]$ 

Fixing it up renaming it to base_name,


Oops, one more:

  CC       /tmp/build/perf/util/symbol-elf.o
cc1: warnings being treated as errors
util/symbol-elf.c: In function ‘kcore__add_phdr’:
util/symbol-elf.c:1167: error: declaration of ‘index’ shadows a global
declaration
/usr/include/string.h:487: error: shadowed declaration is here
util/symbol-elf.c: In function ‘kcore_extract__create’:
util/symbol-elf.c:1202: error: declaration of ‘index’ shadows a global
declaration
/usr/include/string.h:487: error: shadowed declaration is here
make[1]: *** [/tmp/build/perf/util/symbol-elf.o] Error 1
make: *** [install] Error 2
make: Leaving directory `/home/acme/git/linux/tools/perf'
[acme@fedora12 linux]$

Will switch to 'idx'.

- Arnaldo

----- End forwarded message -----

^ permalink raw reply	[flat|nested] 3+ messages in thread
* [PATCH V6 0/8] perf tools: kcore improvements
@ 2013-10-09 12:01 Adrian Hunter
  2013-10-09 12:01 ` [PATCH V6 1/8] perf tools: validate kcore module addresses Adrian Hunter
  0 siblings, 1 reply; 3+ messages in thread
From: Adrian Hunter @ 2013-10-09 12:01 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Peter Zijlstra, linux-kernel, David Ahern, Frederic Weisbecker,
	Jiri Olsa, Mike Galbraith, Namhyung Kim, Paul Mackerras,
	Stephane Eranian

Hi

Here are some improvements for using kcore (version 6).  There are 3
improvements:

	- validate that kcore matches the perf.data modules
	- workaround objdump difficulties with kcore
	- add kcore to the build-id cache

Changes in V6:
	perf tools: make a separate function to parse /proc/modules
		Dropped because it has been applied
	perf tools: workaround objdump difficulties with kcore
		Renamed some functions and reordered parameters
	perf buildid-cache: add ability to add kcore to the cache
		Renamed some functions and reordered parameters

Changes in V5:
	perf tools: make a separate function to parse /proc/modules
		Use scnprintf not snprintf
	perf tools: validate kcore module addresses
		Fix check for mi->name not allocated
	perf buildid-cache: add ability to add kcore to the cache
		Use scnprintf not snprintf
	perf tools: add ability to find kcore in build-id cache
		Use scnprintf not snprintf

Changes in V4:
	perf tools: fix path unpopulated in machine__create_modules()
		Dropped because it has been applied
	perf buildid-cache: add ability to add kcore to the cache
		Tweaked Documentation/perf-buildid-cache.txt
	perf tools: add ability to find kcore in build-id cache
		Changed to check read access to /proc/kcore before
		skipping the buildid cache

Changes in V3:
	perf tools: workaround objdump difficulties with kcore
		change strncpy to strlcpy
	perf buildid-cache: add ability to add kcore to the cache
		change strncpy to strlcpy
	perf tools: add ability to find kcore in build-id cache
		change strncpy to strlcpy
Changes in V2:
	perf tools: fix buildid cache handling of kallsyms with kcore
		Dropped because it has been applied
	perf tools: fix path unpopulated in machine__create_modules()
		Use 'modules' pointer


Adrian Hunter (8):
      perf tools: validate kcore module addresses
      perf tools: workaround objdump difficulties with kcore
      perf tools: add map__find_other_map_symbol()
      perf tools: fix annotate_browser__callq()
      perf tools: find kcore symbols on other maps
      perf tools: add copyfile_mode()
      perf buildid-cache: add ability to add kcore to the cache
      perf tools: add ability to find kcore in build-id cache

 tools/perf/Documentation/perf-buildid-cache.txt |  13 +
 tools/perf/builtin-buildid-cache.c              | 148 +++++-
 tools/perf/ui/browsers/annotate.c               |  10 +-
 tools/perf/util/annotate.c                      |  36 +-
 tools/perf/util/map.c                           |  27 ++
 tools/perf/util/map.h                           |   2 +
 tools/perf/util/symbol-elf.c                    | 579 ++++++++++++++++++++++++
 tools/perf/util/symbol-minimal.c                |  15 +
 tools/perf/util/symbol.c                        | 384 +++++++++++++---
 tools/perf/util/symbol.h                        |  17 +
 tools/perf/util/util.c                          |  18 +-
 tools/perf/util/util.h                          |   1 +
 12 files changed, 1165 insertions(+), 85 deletions(-)


Regards
Adrian


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-11 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-11 18:28 [PATCH V6 1/8] perf tools: validate kcore module addresses Arnaldo Carvalho de Melo
2013-10-11 18:37 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2013-10-09 12:01 [PATCH V6 0/8] perf tools: kcore improvements Adrian Hunter
2013-10-09 12:01 ` [PATCH V6 1/8] perf tools: validate kcore module addresses Adrian Hunter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox