linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL 0/4] perf/core improvements and fixes
@ 2011-08-04 14:57 Arnaldo Carvalho de Melo
  2011-08-05  8:36 ` Ingo Molnar
  0 siblings, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-08-04 14:57 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Arnaldo Carvalho de Melo

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi Ingo,

        Please consider pulling from:

git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/core

	I still need to comb more for patches sent while I was away,
the ones I checked you already merged, thanks.

Regards,

- Arnaldo


Arnaldo Carvalho de Melo (3):
  perf evlist: Introduce 'disable' method
  perf python: Add PERF_RECORD_{LOST,READ,SAMPLE} routine tables
  perf report: Use ui__warning in some more places

Han Pingtian (1):
  perf buildid-cache: Zero out buffer of filenames when adding/removing
    buildid

 tools/perf/builtin-record.c |   19 +------
 tools/perf/builtin-report.c |   15 +++---
 tools/perf/util/evlist.c    |   13 +++++
 tools/perf/util/evlist.h    |    2 +
 tools/perf/util/header.c    |    8 ++--
 tools/perf/util/python.c    |  115 +++++++++++++++++++++++++++++++++++++++++-
 6 files changed, 140 insertions(+), 32 deletions(-)


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

* Re: [GIT PULL 0/4] perf/core improvements and fixes
  2011-08-04 14:57 Arnaldo Carvalho de Melo
@ 2011-08-05  8:36 ` Ingo Molnar
  0 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2011-08-05  8:36 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Peter Zijlstra,
	Thomas Gleixner


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi Ingo,
> 
>         Please consider pulling from:
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux perf/core
> 
> 	I still need to comb more for patches sent while I was away,
> the ones I checked you already merged, thanks.
> 
> Regards,
> 
> - Arnaldo
> 
> 
> Arnaldo Carvalho de Melo (3):
>   perf evlist: Introduce 'disable' method
>   perf python: Add PERF_RECORD_{LOST,READ,SAMPLE} routine tables
>   perf report: Use ui__warning in some more places
> 
> Han Pingtian (1):
>   perf buildid-cache: Zero out buffer of filenames when adding/removing
>     buildid
> 
>  tools/perf/builtin-record.c |   19 +------
>  tools/perf/builtin-report.c |   15 +++---
>  tools/perf/util/evlist.c    |   13 +++++
>  tools/perf/util/evlist.h    |    2 +
>  tools/perf/util/header.c    |    8 ++--
>  tools/perf/util/python.c    |  115 +++++++++++++++++++++++++++++++++++++++++-
>  6 files changed, 140 insertions(+), 32 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/core improvements and fixes
@ 2011-10-20 13:05 Arnaldo Carvalho de Melo
  2011-10-23 10:59 ` Ingo Molnar
  0 siblings, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2011-10-20 13:05 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, David Ahern,
	Frederic Weisbecker, Mike Galbraith, Paul Mackerras,
	Peter Zijlstra, Stephane Eranian, arnaldo.melo

Hi Ingo,

        Please consider pulling from:

git://github.com/acmel/linux.git perf/core

Regards,

- Arnaldo

Arnaldo Carvalho de Melo (4):
  perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
  perf hists: Don't decay total_period for filtered entries
  perf hists: Don't consider filtered entries when calculating column widths
  perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads

 tools/perf/util/hist.c              |   14 ++++++++++----
 tools/perf/util/sort.c              |    4 +++-
 tools/perf/util/ui/browsers/hists.c |   14 ++++++++++++++
 3 files changed, 27 insertions(+), 5 deletions(-)


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

* Re: [GIT PULL 0/4] perf/core improvements and fixes
  2011-10-20 13:05 Arnaldo Carvalho de Melo
@ 2011-10-23 10:59 ` Ingo Molnar
  0 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2011-10-23 10:59 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, David Ahern, Frederic Weisbecker, Mike Galbraith,
	Paul Mackerras, Peter Zijlstra, Stephane Eranian, arnaldo.melo


* Arnaldo Carvalho de Melo <acme@infradead.org> wrote:

> Hi Ingo,
> 
>         Please consider pulling from:
> 
> git://github.com/acmel/linux.git perf/core
> 
> Regards,
> 
> - Arnaldo
> 
> Arnaldo Carvalho de Melo (4):
>   perf hists browser: Honour symbol_conf.show_{nr_samples,total_period}
>   perf hists: Don't decay total_period for filtered entries
>   perf hists: Don't consider filtered entries when calculating column widths
>   perf hists browser: Elide DSO column when it is set to just one DSO, ditto for threads
> 
>  tools/perf/util/hist.c              |   14 ++++++++++----
>  tools/perf/util/sort.c              |    4 +++-
>  tools/perf/util/ui/browsers/hists.c |   14 ++++++++++++++
>  3 files changed, 27 insertions(+), 5 deletions(-)

Pulled, thanks Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/core improvements and fixes
@ 2014-07-10 21:06 Jiri Olsa
  2014-07-16 11:48 ` Ingo Molnar
  0 siblings, 1 reply; 14+ messages in thread
From: Jiri Olsa @ 2014-07-10 21:06 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stanislav Fomichev, Jiri Olsa

hi Ingo,
please consider pulling

thanks,
jirka


The following changes since commit 8b5b584daf3b92fc5cdc83919e64231817d2f5a7:

  Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-07-05 11:29:32 +0200)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo

for you to fetch changes up to d243144af0b52fc5164a0823194f29a5979e236c:

  perf timechart: Add more options to IO mode (2014-07-10 00:22:54 +0200)

----------------------------------------------------------------
perf/core improvements and fixes:

. Add IO mode into timechart command (Stanislav Fomichev)

Signed-off-by: Jiri Olsa <jolsa@kernel.org>

----------------------------------------------------------------
Stanislav Fomichev (4):
      perf timechart: Fix rendering in Firefox
      perf timechart: Implement IO mode
      perf timechart: Conditionally update start_time on fork
      perf timechart: Add more options to IO mode

 tools/perf/Documentation/perf-timechart.txt |  38 +-
 tools/perf/builtin-timechart.c              | 693 +++++++++++++++++++++++++++-
 tools/perf/util/svghelper.c                 | 168 +++++--
 tools/perf/util/svghelper.h                 |   6 +-
 4 files changed, 845 insertions(+), 60 deletions(-)

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

* Re: [GIT PULL 0/4] perf/core improvements and fixes
  2014-07-10 21:06 Jiri Olsa
@ 2014-07-16 11:48 ` Ingo Molnar
  0 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2014-07-16 11:48 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Corey Ashford,
	David Ahern, Frederic Weisbecker, Namhyung Kim, Paul Mackerras,
	Peter Zijlstra, Stanislav Fomichev, Thomas Gleixner


* Jiri Olsa <jolsa@kernel.org> wrote:

> hi Ingo,
> please consider pulling
> 
> thanks,
> jirka
> 
> 
> The following changes since commit 8b5b584daf3b92fc5cdc83919e64231817d2f5a7:
> 
>   Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf into perf/core (2014-07-05 11:29:32 +0200)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to d243144af0b52fc5164a0823194f29a5979e236c:
> 
>   perf timechart: Add more options to IO mode (2014-07-10 00:22:54 +0200)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> . Add IO mode into timechart command (Stanislav Fomichev)
> 
> Signed-off-by: Jiri Olsa <jolsa@kernel.org>
> 
> ----------------------------------------------------------------
> Stanislav Fomichev (4):
>       perf timechart: Fix rendering in Firefox
>       perf timechart: Implement IO mode
>       perf timechart: Conditionally update start_time on fork
>       perf timechart: Add more options to IO mode
> 
>  tools/perf/Documentation/perf-timechart.txt |  38 +-
>  tools/perf/builtin-timechart.c              | 693 +++++++++++++++++++++++++++-
>  tools/perf/util/svghelper.c                 | 168 +++++--
>  tools/perf/util/svghelper.h                 |   6 +-
>  4 files changed, 845 insertions(+), 60 deletions(-)

Pulled, thanks a lot Jiri!

	Ingo

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

* [GIT PULL 0/4] perf/core improvements and fixes
@ 2015-10-20 20:25 Arnaldo Carvalho de Melo
  2015-10-21  8:11 ` Ingo Molnar
  0 siblings, 1 reply; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-20 20:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, Andi Kleen, David Ahern, Jiri Olsa, Kan Liang,
	Masami Hiramatsu, Namhyung Kim, Paolo Bonzini, Paul Mackerras,
	Peter Zijlstra, Steven Rostedt, Wang Nan, Yunlong Song,
	Arnaldo Carvalho de Melo

Hi Ingo,

	Please consider pulling,

- Arnaldo

The following changes since commit 43e41adc9e8c36545888d78fed2ef8d102a938dc:

  perf record: Add ability to sample call branches (2015-10-20 10:30:55 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo

for you to fetch changes up to bab84928dfadf8cba4d3fadcea0890de4da37be8:

  perf evsel: Print branch filter state with -vv (2015-10-20 15:54:21 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Print branch filter state with verbose mode (Andi Kleen)

- Fix core dump caused by per-socket/core system-wide stat (Kan Liang)

- Update libtraceevent KVM plugin (Paolo Bonzini)

Developer stuff:

- Add fixdep to 'tools/build' .gitignore (Yunlong Song)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Andi Kleen (1):
      perf evsel: Print branch filter state with -vv

Kan Liang (1):
      perf cpu_map: Fix core dump caused by per-socket/core system-wide stat

Paolo Bonzini (1):
      tools lib traceevent: update KVM plugin

Yunlong Song (1):
      perf build: Add fixdep to .gitignore

 tools/build/.gitignore            |  1 +
 tools/lib/traceevent/plugin_kvm.c | 25 +++++++++++++++++--------
 tools/perf/util/cpumap.c          |  2 +-
 tools/perf/util/evsel.c           |  1 +
 4 files changed, 20 insertions(+), 9 deletions(-)
 create mode 100644 tools/build/.gitignore

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

* Re: [GIT PULL 0/4] perf/core improvements and fixes
  2015-10-20 20:25 Arnaldo Carvalho de Melo
@ 2015-10-21  8:11 ` Ingo Molnar
  0 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2015-10-21  8:11 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
	David Ahern, Jiri Olsa, Kan Liang, Masami Hiramatsu, Namhyung Kim,
	Paolo Bonzini, Paul Mackerras, Peter Zijlstra, Steven Rostedt,
	Wang Nan, Yunlong Song, Arnaldo Carvalho de Melo


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> Hi Ingo,
> 
> 	Please consider pulling,
> 
> - Arnaldo
> 
> The following changes since commit 43e41adc9e8c36545888d78fed2ef8d102a938dc:
> 
>   perf record: Add ability to sample call branches (2015-10-20 10:30:55 +0200)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo
> 
> for you to fetch changes up to bab84928dfadf8cba4d3fadcea0890de4da37be8:
> 
>   perf evsel: Print branch filter state with -vv (2015-10-20 15:54:21 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Print branch filter state with verbose mode (Andi Kleen)
> 
> - Fix core dump caused by per-socket/core system-wide stat (Kan Liang)
> 
> - Update libtraceevent KVM plugin (Paolo Bonzini)
> 
> Developer stuff:
> 
> - Add fixdep to 'tools/build' .gitignore (Yunlong Song)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Andi Kleen (1):
>       perf evsel: Print branch filter state with -vv
> 
> Kan Liang (1):
>       perf cpu_map: Fix core dump caused by per-socket/core system-wide stat
> 
> Paolo Bonzini (1):
>       tools lib traceevent: update KVM plugin
> 
> Yunlong Song (1):
>       perf build: Add fixdep to .gitignore
> 
>  tools/build/.gitignore            |  1 +
>  tools/lib/traceevent/plugin_kvm.c | 25 +++++++++++++++++--------
>  tools/perf/util/cpumap.c          |  2 +-
>  tools/perf/util/evsel.c           |  1 +
>  4 files changed, 20 insertions(+), 9 deletions(-)
>  create mode 100644 tools/build/.gitignore

Pulled, thanks a lot Arnaldo!

	Ingo

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

* [GIT PULL 0/4] perf/core improvements and fixes
@ 2015-11-25 19:46 Arnaldo Carvalho de Melo
  2015-11-25 19:46 ` [PATCH 1/4] tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-25 19:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, David Ahern, Jiri Olsa, Masami Hiramatsu,
	Michael Petlan, Namhyung Kim, Peter Zijlstra, pi3orama,
	Steven Rostedt, Wang Nan, Zefan Li

From: Arnaldo Carvalho de Melo <acme@redhat.com>

Hi,

	Please consider pulling, this is on top of my previous
perf-core-for-mingo pull request.

- Arnaldo

The following changes since commit 646a6e846c4dc3812c614fd061603b6db5b8d380:

  perf callchain: Add missing parent_val initialization (2015-11-23 18:31:25 -0300)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2

for you to fetch changes up to d8ad6a15cc3a364de6c8010378adc3fb06ce3ff1:

  tools lib bpf: Don't do a feature check when cleaning (2015-11-25 16:38:13 -0300)

----------------------------------------------------------------
perf/core improvements and fixes:

User visible:

- Fix to free temporal Dwarf_Frame correctly in 'perf probe', fixing a
  regression introduced in perf/core that prevented, at least, adding
  an uprobe collecting function parameter values (Masami Hiramatsu)

- Fix output of %llu for 64 bit values read on 32 bit machines in
  libtraceevent (Steven Rostedt)

Developer visible:

- Clean CFLAGS and LDFLAGS for fixdep in tools/build (Wang Nan)

- Don't do a feature check when cleaning tools/lib/bpf (Wang Nan)

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

----------------------------------------------------------------
Masami Hiramatsu (1):
      perf probe: Fix to free temporal Dwarf_Frame correctly

Steven Rostedt (1):
      tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines

Wang Nan (2):
      tools build: Clean CFLAGS and LDFLAGS for fixdep
      tools lib bpf: Don't do a feature check when cleaning

 tools/build/Makefile.include       |  2 +-
 tools/lib/bpf/Makefile             | 10 ++++++++++
 tools/lib/traceevent/event-parse.c |  5 ++---
 tools/perf/util/probe-finder.c     | 13 ++++++-------
 4 files changed, 19 insertions(+), 11 deletions(-)

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

* [PATCH 1/4] tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines
  2015-11-25 19:46 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-11-25 19:46 ` Arnaldo Carvalho de Melo
  2015-11-25 19:47 ` [PATCH 2/4] perf probe: Fix to free temporal Dwarf_Frame correctly Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-25 19:46 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Steven Rostedt, stable, Arnaldo Carvalho de Melo

From: Steven Rostedt <rostedt@goodmis.org>

When a long value is read on 32 bit machines for 64 bit output, the
parsing needs to change "%lu" into "%llu", as the value is read
natively.

Unfortunately, if "%llu" is already there, the code will add another "l"
to it and fail to parse it properly.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: stable@vger.kernel.org
Link: http://lkml.kernel.org/r/20151116172516.4b79b109@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/event-parse.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 2a912df6771b..68276f35e323 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -4968,13 +4968,12 @@ static void pretty_print(struct trace_seq *s, void *data, int size, struct event
 				    sizeof(long) != 8) {
 					char *p;
 
-					ls = 2;
 					/* make %l into %ll */
-					p = strchr(format, 'l');
-					if (p)
+					if (ls == 1 && (p = strchr(format, 'l')))
 						memmove(p+1, p, strlen(p)+1);
 					else if (strcmp(format, "%p") == 0)
 						strcpy(format, "0x%llx");
+					ls = 2;
 				}
 				switch (ls) {
 				case -2:
-- 
2.1.0


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

* [PATCH 2/4] perf probe: Fix to free temporal Dwarf_Frame correctly
  2015-11-25 19:46 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-11-25 19:46 ` [PATCH 1/4] tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines Arnaldo Carvalho de Melo
@ 2015-11-25 19:47 ` Arnaldo Carvalho de Melo
  2015-11-25 19:47 ` [PATCH 3/4] tools build: Clean CFLAGS and LDFLAGS for fixdep Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-25 19:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Masami Hiramatsu, Adrian Hunter, David Ahern,
	Jiri Olsa, Namhyung Kim, Peter Zijlstra, Wang Nan,
	Arnaldo Carvalho de Melo

From: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>

The commit 05c8d802fa52 ("perf probe: Fix to free temporal Dwarf_Frame")
tried to fix the memory leak of Dwarf_Frame, but it released the frame
at wrong point. Since the dwarf_frame_cfa(frame, &pf->fb_ops, &nops) can
return an address inside the frame data structure to pf->fb_ops, we can
not release the frame before using pf->fb_ops.

This reverts the commit and releases the frame afterwards (right before
returning from call_probe_finder) correctly.

Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Reported-by: Michael Petlan <mpetlan@redhat.com>
Signed-off-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 05c8d802fa52 ("perf probe: Fix to free temporal Dwarf_Frame")
LPU-Reference: 20151125103432.1473.31009.stgit@localhost.localdomain
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/probe-finder.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/perf/util/probe-finder.c b/tools/perf/util/probe-finder.c
index 1cab05a3831e..2be10fb27172 100644
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -654,6 +654,7 @@ static int convert_to_trace_point(Dwarf_Die *sp_die, Dwfl_Module *mod,
 static int call_probe_finder(Dwarf_Die *sc_die, struct probe_finder *pf)
 {
 	Dwarf_Attribute fb_attr;
+	Dwarf_Frame *frame = NULL;
 	size_t nops;
 	int ret;
 
@@ -683,26 +684,24 @@ static int call_probe_finder(Dwarf_Die *sc_die, struct probe_finder *pf)
 	ret = dwarf_getlocation_addr(&fb_attr, pf->addr, &pf->fb_ops, &nops, 1);
 	if (ret <= 0 || nops == 0) {
 		pf->fb_ops = NULL;
-		ret = 0;
 #if _ELFUTILS_PREREQ(0, 142)
 	} else if (nops == 1 && pf->fb_ops[0].atom == DW_OP_call_frame_cfa &&
 		   pf->cfi != NULL) {
-		Dwarf_Frame *frame = NULL;
 		if (dwarf_cfi_addrframe(pf->cfi, pf->addr, &frame) != 0 ||
 		    dwarf_frame_cfa(frame, &pf->fb_ops, &nops) != 0) {
 			pr_warning("Failed to get call frame on 0x%jx\n",
 				   (uintmax_t)pf->addr);
-			ret = -ENOENT;
+			free(frame);
+			return -ENOENT;
 		}
-		free(frame);
 #endif
 	}
 
 	/* Call finder's callback handler */
-	if (ret >= 0)
-		ret = pf->callback(sc_die, pf);
+	ret = pf->callback(sc_die, pf);
 
-	/* *pf->fb_ops will be cached in libdw. Don't free it. */
+	/* Since *pf->fb_ops can be a part of frame. we should free it here. */
+	free(frame);
 	pf->fb_ops = NULL;
 
 	return ret;
-- 
2.1.0


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

* [PATCH 3/4] tools build: Clean CFLAGS and LDFLAGS for fixdep
  2015-11-25 19:46 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-11-25 19:46 ` [PATCH 1/4] tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines Arnaldo Carvalho de Melo
  2015-11-25 19:47 ` [PATCH 2/4] perf probe: Fix to free temporal Dwarf_Frame correctly Arnaldo Carvalho de Melo
@ 2015-11-25 19:47 ` Arnaldo Carvalho de Melo
  2015-11-25 19:47 ` [PATCH 4/4] tools lib bpf: Don't do a feature check when cleaning Arnaldo Carvalho de Melo
  2015-11-26  8:15 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar
  4 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-25 19:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Masami Hiramatsu,
	Zefan Li, pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Sometimes passing variables to tools/build is dangerous. For example, on
my platform there is a gcc problem (gcc 4.8.1):

It passes the stackprotector-all feature check:

  $ gcc -fstack-protector-all -c ./test.c
  $ echo $?
  0

But requires LDFLAGS support if separate compiling and linking:
  $ gcc -fstack-protector-all -c ./test.c
  $ gcc ./test.o
  ./test.o: In function `main':
  test.c:(.text+0xb): undefined reference to `__stack_chk_guard'
  test.c:(.text+0x21): undefined reference to `__stack_chk_guard'
  collect2: error: ld returned 1 exit status
  $ gcc -fstack-protector-all ./test.o
  $ echo $?
  0
  $ gcc ./test.o -lssp
  $ echo $?
  0
  $

In this environment building perf throws an error:

  $ make
    BUILD:   Doing 'make -j24' parallel build
  config/Makefile:344: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
  config/Makefile:403: No libaudit.h found, disables 'trace' tool, please install audit-libs-devel or libaudit-dev
  config/Makefile:418: slang not found, disables TUI support. Please install slang-devel or libslang-dev
  config/Makefile:432: GTK2 not found, disables GTK2 support. Please install gtk2-devel or libgtk2.0-dev
  config/Makefile:564: No bfd.h/libbfd found, please install binutils-dev[el]/zlib-static/libiberty-dev to gain symbol demangling
  config/Makefile:606: No numa.h found, disables 'perf bench numa mem' benchmark, please install numactl-devel/libnuma-devel/libnuma-dev
    CC       fixdep.o
    LD       fixdep-in.o
    LINK     fixdep
  fixdep-in.o: In function `parse_dep_file':
  /kernel/tools/build/fixdep.c:47: undefined reference to `__stack_chk_guard'
  /kernel/tools/build/fixdep.c:117: undefined reference to `__stack_chk_guard'
  fixdep-in.o: In function `main':
  /kernel-hydrogen/tools/build/fixdep.c:156: undefined reference to `__stack_chk_guard'
  /kernel/tools/build/fixdep.c:168: undefined reference to `__stack_chk_guard'
  collect2: error: ld returned 1 exit status
  make[2]: *** [fixdep] Error 1
  make[1]: *** [fixdep] Error 2
  make: *** [all] Error 2

This is because the CFLAGS used in building perf pollutes the CFLAGS
used for fixdep, passing -fstack-protector-all to buiold fixdep which is
obviously not required. Since fixdep is a small host side tool, we
should keep its CFLAGS/LDFLAGS simple and clean.

This patch clears the CFLAGS and LDFLAGS passed when building fixdep, so
such gcc problem won't block the perf build process.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1448372181-151723-2-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/Makefile.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/build/Makefile.include b/tools/build/Makefile.include
index 4e09ad617a60..6254760290c9 100644
--- a/tools/build/Makefile.include
+++ b/tools/build/Makefile.include
@@ -4,7 +4,7 @@ ifdef CROSS_COMPILE
 fixdep:
 else
 fixdep:
-	$(Q)$(MAKE) -C $(srctree)/tools/build fixdep
+	$(Q)$(MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= fixdep
 endif
 
 .PHONY: fixdep
-- 
2.1.0


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

* [PATCH 4/4] tools lib bpf: Don't do a feature check when cleaning
  2015-11-25 19:46 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2015-11-25 19:47 ` [PATCH 3/4] tools build: Clean CFLAGS and LDFLAGS for fixdep Arnaldo Carvalho de Melo
@ 2015-11-25 19:47 ` Arnaldo Carvalho de Melo
  2015-11-26  8:15 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar
  4 siblings, 0 replies; 14+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-11-25 19:47 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Wang Nan, Alexei Starovoitov, Jiri Olsa,
	Masami Hiramatsu, Zefan Li, pi3orama, Arnaldo Carvalho de Melo

From: Wang Nan <wangnan0@huawei.com>

Before this patch libbpf always do feature check even when cleaning.

For example:

  $ cd kernel/tools/lib/bpf
  $ make

  Auto-detecting system features:
  ...                        libelf: [ on  ]
  ...                           bpf: [ on  ]

    CC       libbpf.o
    CC       bpf.o
    LD       libbpf-in.o
    LINK     libbpf.a
    LINK     libbpf.so
  $ make clean
    CLEAN    libbpf
    CLEAN    core-gen
  $ make clean

  Auto-detecting system features:
  ...                        libelf: [ on  ]
  ...                           bpf: [ on  ]

    CLEAN    libbpf
    CLEAN    core-gen
  $

Although the first 'make clean' doesn't show feature check result, it
still does the check. No output because check result is similar to
FEATURE-DUMP.libbpf.

This patch uses same method as perf to turn off feature checking when
'make clean'.

Reported-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1448372181-151723-3-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/bpf/Makefile | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tools/lib/bpf/Makefile b/tools/lib/bpf/Makefile
index a3caaf3eafbd..636e3ddb93a1 100644
--- a/tools/lib/bpf/Makefile
+++ b/tools/lib/bpf/Makefile
@@ -71,7 +71,17 @@ FEATURE_DISPLAY = libelf bpf
 INCLUDES = -I. -I$(srctree)/tools/include -I$(srctree)/arch/$(ARCH)/include/uapi -I$(srctree)/include/uapi
 FEATURE_CHECK_CFLAGS-bpf = $(INCLUDES)
 
+check_feat := 1
+NON_CHECK_FEAT_TARGETS := clean TAGS tags cscope help
+ifdef MAKECMDGOALS
+ifeq ($(filter-out $(NON_CHECK_FEAT_TARGETS),$(MAKECMDGOALS)),)
+  check_feat := 0
+endif
+endif
+
+ifeq ($(check_feat),1)
 include $(srctree)/tools/build/Makefile.feature
+endif
 
 export prefix libdir src obj
 
-- 
2.1.0


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

* Re: [GIT PULL 0/4] perf/core improvements and fixes
  2015-11-25 19:46 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2015-11-25 19:47 ` [PATCH 4/4] tools lib bpf: Don't do a feature check when cleaning Arnaldo Carvalho de Melo
@ 2015-11-26  8:15 ` Ingo Molnar
  4 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2015-11-26  8:15 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
	Alexei Starovoitov, David Ahern, Jiri Olsa, Masami Hiramatsu,
	Michael Petlan, Namhyung Kim, Peter Zijlstra, pi3orama,
	Steven Rostedt, Wang Nan, Zefan Li


* Arnaldo Carvalho de Melo <acme@kernel.org> wrote:

> From: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> Hi,
> 
> 	Please consider pulling, this is on top of my previous
> perf-core-for-mingo pull request.
> 
> - Arnaldo
> 
> The following changes since commit 646a6e846c4dc3812c614fd061603b6db5b8d380:
> 
>   perf callchain: Add missing parent_val initialization (2015-11-23 18:31:25 -0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git tags/perf-core-for-mingo-2
> 
> for you to fetch changes up to d8ad6a15cc3a364de6c8010378adc3fb06ce3ff1:
> 
>   tools lib bpf: Don't do a feature check when cleaning (2015-11-25 16:38:13 -0300)
> 
> ----------------------------------------------------------------
> perf/core improvements and fixes:
> 
> User visible:
> 
> - Fix to free temporal Dwarf_Frame correctly in 'perf probe', fixing a
>   regression introduced in perf/core that prevented, at least, adding
>   an uprobe collecting function parameter values (Masami Hiramatsu)
> 
> - Fix output of %llu for 64 bit values read on 32 bit machines in
>   libtraceevent (Steven Rostedt)
> 
> Developer visible:
> 
> - Clean CFLAGS and LDFLAGS for fixdep in tools/build (Wang Nan)
> 
> - Don't do a feature check when cleaning tools/lib/bpf (Wang Nan)
> 
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> ----------------------------------------------------------------
> Masami Hiramatsu (1):
>       perf probe: Fix to free temporal Dwarf_Frame correctly
> 
> Steven Rostedt (1):
>       tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines
> 
> Wang Nan (2):
>       tools build: Clean CFLAGS and LDFLAGS for fixdep
>       tools lib bpf: Don't do a feature check when cleaning
> 
>  tools/build/Makefile.include       |  2 +-
>  tools/lib/bpf/Makefile             | 10 ++++++++++
>  tools/lib/traceevent/event-parse.c |  5 ++---
>  tools/perf/util/probe-finder.c     | 13 ++++++-------
>  4 files changed, 19 insertions(+), 11 deletions(-)

Pulled, thanks a lot Arnaldo!

	Ingo

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

end of thread, other threads:[~2015-11-26  8:15 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-25 19:46 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-11-25 19:46 ` [PATCH 1/4] tools lib traceevent: Fix output of %llu for 64 bit values read on 32 bit machines Arnaldo Carvalho de Melo
2015-11-25 19:47 ` [PATCH 2/4] perf probe: Fix to free temporal Dwarf_Frame correctly Arnaldo Carvalho de Melo
2015-11-25 19:47 ` [PATCH 3/4] tools build: Clean CFLAGS and LDFLAGS for fixdep Arnaldo Carvalho de Melo
2015-11-25 19:47 ` [PATCH 4/4] tools lib bpf: Don't do a feature check when cleaning Arnaldo Carvalho de Melo
2015-11-26  8:15 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2015-10-20 20:25 Arnaldo Carvalho de Melo
2015-10-21  8:11 ` Ingo Molnar
2014-07-10 21:06 Jiri Olsa
2014-07-16 11:48 ` Ingo Molnar
2011-10-20 13:05 Arnaldo Carvalho de Melo
2011-10-23 10:59 ` Ingo Molnar
2011-08-04 14:57 Arnaldo Carvalho de Melo
2011-08-05  8:36 ` Ingo Molnar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).