Re: arm/arm64 perf build issue with mainline
Em Mon, May 11, 2015 at 02:33:04PM +0200, Ingo Molnar escreveu: > > * Will Deacon wrote: > > > On Mon, May 11, 2015 at 09:21:20AM +0100, Ingo Molnar wrote: > > > * David Ahern wrote: > > > > On 4/23/15 5:29 AM, Will Deacon wrote: > > > > >Commit 6428c59a97de ("perf tools: Set JOBS based on CPU or processor") > > > > >causes weird behaviour on arm/arm64 platforms because we use the "CPU" > > > > >prefix for things like: > > > > > > > > > >CPU implementer : 0x41 > > > > >CPU architecture: 8 > > > > >CPU variant : 0x0 > > > > >CPU part: 0xd03 > > > > >CPU revision: 0 > > > > > > > > > >in /proc/cpuinfo. Consequently, a 6 core machine ends up doing: > > > > > > > > > >will@confinement-loaf:~/linux/tools/perf$ make > > > > > BUILD: Doing 'make -j36' parallel build > > > > > > > > > >which is a little overwhelming. Any chance we can predicate the extra > > > > >part of the regex on $(ARCH) being sparc? > > > > > > That regex needs to be fixed or replaced with a more robust 'number of > > > CPUs on the system' discovery method. > > > > That was already proposed here (as part of the fallback from getconf): > > > > https://lkml.kernel.org/r/20150427190356.gd...@krava.redhat.com > > > > but I'm not sure what happened to the patch. > > Sending out the latest/best version as a reminder for Arnaldo will > sure help it along. > > Acked-by: Ingo Molnar IIRC it was merged already, lemme check... - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: arm/arm64 perf build issue with mainline
Em Mon, May 11, 2015 at 12:58:14PM -0300, a...@redhat.com escreveu: > Em Mon, May 11, 2015 at 02:33:04PM +0200, Ingo Molnar escreveu: > > > That was already proposed here (as part of the fallback from getconf): > > > > > > https://lkml.kernel.org/r/20150427190356.gd...@krava.redhat.com > > > > > > but I'm not sure what happened to the patch. > > > > Sending out the latest/best version as a reminder for Arnaldo will > > sure help it along. > > > > Acked-by: Ingo Molnar > > IIRC it was merged already, lemme check... Yes, only for perf/core: [acme@zoo linux]$ git show 762abdc0c6c013425958cd9f5105f4e32268d434 commit 762abdc0c6c013425958cd9f5105f4e32268d434 Author: Will Deacon Date: Thu Apr 23 15:00:16 2015 +0100 perf tools: Use getconf to determine number of online CPUs Parsing /proc/cpuinfo is a fiddly, arch-dependent business and a recent change to get it working for Sparc broke arm and arm64 platforms. Use sysconf to determine the number of online CPUs only parsing /proc/cpuinfo when sysconf is not available. Signed-off-by: Will Deacon Acked-by: Jiri Olsa Tested-by: Arnaldo Carvalho de Melo Cc: David Ahern Cc: Mark Rutland Cc: Namhyung Kim Link: http://lkml.kernel.org/r/20150423140454.gj1...@arm.com [ Made it fall back to parsing /proc when getconf not found ] Signed-off-by: Arnaldo Carvalho de Melo diff --git a/tools/perf/Makefile b/tools/perf/Makefile index c699dc35eef9..d31a7bbd7cee 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile @@ -24,7 +24,7 @@ unexport MAKEFLAGS # (To override it, run 'make JOBS=1' and similar.) # ifeq ($(JOBS),) - JOBS := $(shell egrep -c '^processor|^CPU' /proc/cpuinfo 2>/dev/null) + JOBS := $(shell (getconf _NPROCESSORS_ONLN || egrep -c '^processor|^CPU[0-9]' /proc/cpuinfo) 2>/dev/null) ifeq ($(JOBS),0) JOBS := 1 endif [acme@zoo linux]$ -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH v2] perf tools: don't adjust symbols in vDSO
Em Mon, Jun 29, 2015 at 02:52:39PM +0100, Will Deacon escreveu: > On Mon, Jun 29, 2015 at 02:23:51PM +0100, Adrian Hunter wrote: > > On 29/06/15 15:30, Adrian Hunter wrote: > > > On 29/06/15 12:02, Adrian Hunter wrote: > > >> On 27/06/15 12:10, Will Deacon wrote: > > >>> @@ -824,6 +823,14 @@ int dso__load_sym(struct dso *dso, struct map *map, > > >>> sec = syms_ss->symtab; > > >>> shdr = syms_ss->symshdr; > > >>> > > >>> + /* > > >>> +* Older x86 kernels prelink the vDSO at a high address, so > > >>> +* we need to reflect that in map->pgoff in order to talk to > > >>> +* objdump. > > >>> +*/ > > >>> + if (dso__is_vdso(dso)) > > >>> + map->pgoff = shdr.sh_addr - shdr.sh_offset; > > >> > > >> In the case of perf tools, maps map memory addresses to file offsets. > > >> That is used to read from the object file, so you can't change the map. > > > > > > So what about just this instead: > > > > > > if (dso__is_vdso(dso)) > > > map->reloc = shdr.sh_addr - shdr.sh_offset; > > > > > > > No that's no good either :-( > > Yeah... we're fighting against symbol lookup wanting ->map_ip to give the > address of the ELF symbol but unwinding wanting ->map_ip to give a relative > offset for file reads. > > Also, the reloc is a bit weird and I think needs to be the other way around > (i.e. we convert from a map-relative address to an objdump address by > *subtracting* the reloc). Even with that change, I run into problems with > annotate comparing ELF symbol addresses with map addresses. Urgh. Its been a long time that I looked at this, but perhaps these can help: /* rip/ip <-> addr suitable for passing to `objdump --start-address=` */ u64 map__rip_2objdump(struct map *map, u64 rip); /* objdump address -> memory address */ u64 map__objdump_2mem(struct map *map, u64 ip); The comments in the changeset that introduced it have more info: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=7a2b6209863626cf8362e5ff4653491558f91e67 - Arnaldo - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Re: [PATCH] perf vendor events: Add Goldmont Plus V1 event file
Em Mon, Oct 23, 2017 at 07:23:41PM +, Liang, Kan escreveu: > > Em Thu, Oct 19, 2017 at 01:37:55PM -0700, Andi Kleen escreveu: > > > On Thu, Oct 19, 2017 at 04:58:33PM -0300, Arnaldo Carvalho de Melo > > wrote: > > > > Em Wed, Oct 18, 2017 at 06:05:07AM -0700, kan.li...@intel.com > > escreveu: > > > > > From: Kan Liang > > > > > > > > > > Add a Intel event file for perf. > > > > > > > > Andi, can I have your Acked-by or reviewed-by? > > > > > > Acked-by: Andi Kleen > > > > Thanks, applied. > > > Hi Arnaldo, > > Will this patch be pushed to perf/urgent for 4.14? No, its in perf/core. - Arnaldo