All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL 0/4] perf/core improvements and fixes
@ 2015-10-20 20:25 Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 1/4] perf build: Add fixdep to .gitignore Arnaldo Carvalho de Melo
                   ` (4 more replies)
  0 siblings, 5 replies; 11+ 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] 11+ messages in thread

* [PATCH 1/4] perf build: Add fixdep to .gitignore
  2015-10-20 20:25 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-10-20 20:25 ` Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 2/4] tools lib traceevent: update KVM plugin Arnaldo Carvalho de Melo
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-20 20:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Yunlong Song, Adrian Hunter, Alexei Starovoitov,
	David Ahern, Jiri Olsa, Kan Liang, Masami Hiramatsu,
	Namhyung Kim, Paul Mackerras, Peter Zijlstra, Wang Nan,
	Arnaldo Carvalho de Melo

From: Yunlong Song <yunlong.song@huawei.com>

Commit 7c422f5572667fef0db38d2046ecce69dcf0afc8 ("tools build: Build
fixdep helper from perf and basic libs") dynamically creates fixdep
during the perf building. Add it to .gitignore.

Signed-off-by: Yunlong Song <yunlong.song@huawei.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@intel.com>
Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Wang Nan <wangnan0@huawei.com>
Fixes: 7c422f557266 ("tools build: Build fixdep helper from perf and basic libs")
Link: http://lkml.kernel.org/r/1444899116-8220-1-git-send-email-yunlong.song@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/build/.gitignore | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 tools/build/.gitignore

diff --git a/tools/build/.gitignore b/tools/build/.gitignore
new file mode 100644
index 000000000000..a776371a3502
--- /dev/null
+++ b/tools/build/.gitignore
@@ -0,0 +1 @@
+fixdep
-- 
2.1.0


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

* [PATCH 2/4] tools lib traceevent: update KVM plugin
  2015-10-20 20:25 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 1/4] perf build: Add fixdep to .gitignore Arnaldo Carvalho de Melo
@ 2015-10-20 20:25 ` Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 3/4] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat Arnaldo Carvalho de Melo
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-20 20:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Paolo Bonzini, David Ahern, Namhyung Kim, kvm,
	Arnaldo Carvalho de Melo

From: Paolo Bonzini <pbonzini@redhat.com>

The format of the role word has changed through the years and the plugin
was never updated; some VMX exit reasons were missing too.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: kvm@vger.kernel.org
Link: http://lkml.kernel.org/r/1443695293-31127-1-git-send-email-pbonzini@redhat.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/lib/traceevent/plugin_kvm.c | 25 +++++++++++++++++--------
 1 file changed, 17 insertions(+), 8 deletions(-)

diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index 88fe83dff7cd..18536f756577 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -124,7 +124,10 @@ static const char *disassemble(unsigned char *insn, int len, uint64_t rip,
 	_ER(WBINVD,		 54)		\
 	_ER(XSETBV,		 55)		\
 	_ER(APIC_WRITE,		 56)		\
-	_ER(INVPCID,		 58)
+	_ER(INVPCID,		 58)		\
+	_ER(PML_FULL,		 62)		\
+	_ER(XSAVES,		 63)		\
+	_ER(XRSTORS,		 64)
 
 #define SVM_EXIT_REASONS \
 	_ER(EXIT_READ_CR0,	0x000)		\
@@ -352,15 +355,18 @@ static int kvm_nested_vmexit_handler(struct trace_seq *s, struct pevent_record *
 union kvm_mmu_page_role {
 	unsigned word;
 	struct {
-		unsigned glevels:4;
 		unsigned level:4;
+		unsigned cr4_pae:1;
 		unsigned quadrant:2;
-		unsigned pad_for_nice_hex_output:6;
 		unsigned direct:1;
 		unsigned access:3;
 		unsigned invalid:1;
-		unsigned cr4_pge:1;
 		unsigned nxe:1;
+		unsigned cr0_wp:1;
+		unsigned smep_and_not_wp:1;
+		unsigned smap_and_not_wp:1;
+		unsigned pad_for_nice_hex_output:8;
+		unsigned smm:8;
 	};
 };
 
@@ -385,15 +391,18 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct pevent_record *record,
 	if (pevent_is_file_bigendian(event->pevent) ==
 	    pevent_is_host_bigendian(event->pevent)) {
 
-		trace_seq_printf(s, "%u/%u q%u%s %s%s %spge %snxe",
+		trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s",
 				 role.level,
-				 role.glevels,
 				 role.quadrant,
 				 role.direct ? " direct" : "",
 				 access_str[role.access],
 				 role.invalid ? " invalid" : "",
-				 role.cr4_pge ? "" : "!",
-				 role.nxe ? "" : "!");
+				 role.cr4_pae ? "" : "!",
+				 role.nxe ? "" : "!",
+				 role.cr0_wp ? "" : "!",
+				 role.smep_and_not_wp ? " smep" : "",
+				 role.smap_and_not_wp ? " smap" : "",
+				 role.smm ? " smm" : "");
 	} else
 		trace_seq_printf(s, "WORD: %08x", role.word);
 
-- 
2.1.0


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

* [PATCH 3/4] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat
  2015-10-20 20:25 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 1/4] perf build: Add fixdep to .gitignore Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 2/4] tools lib traceevent: update KVM plugin Arnaldo Carvalho de Melo
@ 2015-10-20 20:25 ` Arnaldo Carvalho de Melo
  2015-10-20 20:25 ` [PATCH 4/4] perf evsel: Print branch filter state with -vv Arnaldo Carvalho de Melo
  2015-10-21  8:11 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar
  4 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-20 20:25 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: linux-kernel, Kan Liang, Andi Kleen, Arnaldo Carvalho de Melo

From: Kan Liang <kan.liang@intel.com>

Perf will core dump if --per-socket/core -a are applied for perf stat.

The root cause is that cpu_map__build_map set refcnt of evlist's cpu_map
to 1.  It should set refcnt for the newly created cpu_map, not evlist's
cpu_map.

Here is the example:

  # perf stat -e cycles --per-socket -a sleep 1

   Performance counter stats for 'system wide':

  S0       36         30,196,257      cycles
  S1       28         15,823,536      cycles

       1.001126828 seconds time elapsed

  *** Error in `./perf': corrupted double-linked list: 0x00000000021f9090 ***
  ======= Backtrace: =========
  /lib64/libc.so.6[0x3002e7bbe7]
  /lib64/libc.so.6[0x3002e7d2b5]
  ./perf(perf_evsel__delete+0x28)[0x485bdd]
  ./perf[0x4800e8]
  ./perf(perf_evlist__delete+0x5e)[0x482cd5]
  ./perf(cmd_stat+0xf25)[0x432328]
  ./perf[0x4768e0]
  ./perf[0x476ad6]
  ./perf[0x476b41]
  ./perf(main+0x1d0)[0x476db2]
  /lib64/libc.so.6(__libc_start_main+0xf5)[0x3002e21b45]
  ./perf[0x4202c5]

Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Link: http://lkml.kernel.org/r/1444388363-35936-1-git-send-email-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/cpumap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/cpumap.c b/tools/perf/util/cpumap.c
index b36845347f01..aa6b490aa471 100644
--- a/tools/perf/util/cpumap.c
+++ b/tools/perf/util/cpumap.c
@@ -285,7 +285,7 @@ int cpu_map__build_map(struct cpu_map *cpus, struct cpu_map **res,
 	/* ensure we process id in increasing order */
 	qsort(c->map, c->nr, sizeof(int), cmp_ids);
 
-	atomic_set(&cpus->refcnt, 1);
+	atomic_set(&c->refcnt, 1);
 	*res = c;
 	return 0;
 }
-- 
2.1.0


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

* [PATCH 4/4] perf evsel: Print branch filter state with -vv
  2015-10-20 20:25 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (2 preceding siblings ...)
  2015-10-20 20:25 ` [PATCH 3/4] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat Arnaldo Carvalho de Melo
@ 2015-10-20 20:25 ` Arnaldo Carvalho de Melo
  2015-10-21  8:32   ` Peter Zijlstra
  2015-10-21  8:11 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar
  4 siblings, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-20 20:25 UTC (permalink / raw)
  To: Ingo Molnar
  Cc: linux-kernel, Andi Kleen, Jiri Olsa, Peter Zijlstra,
	Arnaldo Carvalho de Melo

From: Andi Kleen <ak@linux.intel.com>

Add a missing field to the perf_event_attr debug output.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1445366797-30894-4-git-send-email-andi@firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/evsel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 8be867ccefe9..11bf3f2c51cd 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1229,6 +1229,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
 	PRINT_ATTRf(config, p_hex);
 	PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned);
 	PRINT_ATTRf(sample_type, p_sample_type);
+	PRINT_ATTRf(branch_sample_type, p_unsigned);
 	PRINT_ATTRf(read_format, p_read_format);
 
 	PRINT_ATTRf(disabled, p_unsigned);
-- 
2.1.0


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

* Re: [GIT PULL 0/4] perf/core improvements and fixes
  2015-10-20 20:25 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
                   ` (3 preceding siblings ...)
  2015-10-20 20:25 ` [PATCH 4/4] perf evsel: Print branch filter state with -vv Arnaldo Carvalho de Melo
@ 2015-10-21  8:11 ` Ingo Molnar
  4 siblings, 0 replies; 11+ 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] 11+ messages in thread

* Re: [PATCH 4/4] perf evsel: Print branch filter state with -vv
  2015-10-20 20:25 ` [PATCH 4/4] perf evsel: Print branch filter state with -vv Arnaldo Carvalho de Melo
@ 2015-10-21  8:32   ` Peter Zijlstra
  2015-10-21  9:25     ` Ingo Molnar
  2015-10-21 18:07     ` Arnaldo Carvalho de Melo
  0 siblings, 2 replies; 11+ messages in thread
From: Peter Zijlstra @ 2015-10-21  8:32 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: Ingo Molnar, linux-kernel, Andi Kleen, Jiri Olsa,
	Arnaldo Carvalho de Melo

On Tue, Oct 20, 2015 at 05:25:07PM -0300, Arnaldo Carvalho de Melo wrote:
> From: Andi Kleen <ak@linux.intel.com>
> 
> Add a missing field to the perf_event_attr debug output.
> 
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Link: http://lkml.kernel.org/r/1445366797-30894-4-git-send-email-andi@firstfloor.org
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> ---
>  tools/perf/util/evsel.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 8be867ccefe9..11bf3f2c51cd 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -1229,6 +1229,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
>  	PRINT_ATTRf(config, p_hex);
>  	PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned);
>  	PRINT_ATTRf(sample_type, p_sample_type);
> +	PRINT_ATTRf(branch_sample_type, p_unsigned);
>  	PRINT_ATTRf(read_format, p_read_format);

As said in the original thread, this is the wrong place, it should be
between config2 and sample_regs_user.

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

* Re: [PATCH 4/4] perf evsel: Print branch filter state with -vv
  2015-10-21  8:32   ` Peter Zijlstra
@ 2015-10-21  9:25     ` Ingo Molnar
  2015-10-21 13:22       ` Arnaldo Carvalho de Melo
  2015-10-21 18:07     ` Arnaldo Carvalho de Melo
  1 sibling, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2015-10-21  9:25 UTC (permalink / raw)
  To: Peter Zijlstra
  Cc: Arnaldo Carvalho de Melo, linux-kernel, Andi Kleen, Jiri Olsa,
	Arnaldo Carvalho de Melo


* Peter Zijlstra <peterz@infradead.org> wrote:

> On Tue, Oct 20, 2015 at 05:25:07PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > Add a missing field to the perf_event_attr debug output.
> > 
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Link: http://lkml.kernel.org/r/1445366797-30894-4-git-send-email-andi@firstfloor.org
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > ---
> >  tools/perf/util/evsel.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> > index 8be867ccefe9..11bf3f2c51cd 100644
> > --- a/tools/perf/util/evsel.c
> > +++ b/tools/perf/util/evsel.c
> > @@ -1229,6 +1229,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
> >  	PRINT_ATTRf(config, p_hex);
> >  	PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned);
> >  	PRINT_ATTRf(sample_type, p_sample_type);
> > +	PRINT_ATTRf(branch_sample_type, p_unsigned);
> >  	PRINT_ATTRf(read_format, p_read_format);
> 
> As said in the original thread, this is the wrong place, it should be
> between config2 and sample_regs_user.

Ok, I've unpulled these updates, since I haven't pushed these bits out yet.

Thanks,

	Ingo

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

* Re: [PATCH 4/4] perf evsel: Print branch filter state with -vv
  2015-10-21  9:25     ` Ingo Molnar
@ 2015-10-21 13:22       ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 13:22 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: Peter Zijlstra, linux-kernel, Andi Kleen, Jiri Olsa

Em Wed, Oct 21, 2015 at 11:25:25AM +0200, Ingo Molnar escreveu:
> * Peter Zijlstra <peterz@infradead.org> wrote:
> > On Tue, Oct 20, 2015 at 05:25:07PM -0300, Arnaldo Carvalho de Melo wrote:
> > > From: Andi Kleen <ak@linux.intel.com>

> > > Add a missing field to the perf_event_attr debug output.

> > > +++ b/tools/perf/util/evsel.c
> > > @@ -1229,6 +1229,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
> > >  	PRINT_ATTRf(config, p_hex);
> > >  	PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned);
> > >  	PRINT_ATTRf(sample_type, p_sample_type);
> > > +	PRINT_ATTRf(branch_sample_type, p_unsigned);
> > >  	PRINT_ATTRf(read_format, p_read_format);

> > As said in the original thread, this is the wrong place, it should be
> > between config2 and sample_regs_user.
 
> Ok, I've unpulled these updates, since I haven't pushed these bits out yet.

I'll fix this as pointed out by Peter and resubmit.

- Arnaldo

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

* Re: [PATCH 4/4] perf evsel: Print branch filter state with -vv
  2015-10-21  8:32   ` Peter Zijlstra
  2015-10-21  9:25     ` Ingo Molnar
@ 2015-10-21 18:07     ` Arnaldo Carvalho de Melo
  2015-10-21 19:02       ` Peter Zijlstra
  1 sibling, 1 reply; 11+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 18:07 UTC (permalink / raw)
  To: Peter Zijlstra; +Cc: Ingo Molnar, linux-kernel, Andi Kleen, Jiri Olsa

Em Wed, Oct 21, 2015 at 10:32:15AM +0200, Peter Zijlstra escreveu:
> On Tue, Oct 20, 2015 at 05:25:07PM -0300, Arnaldo Carvalho de Melo wrote:
> > From: Andi Kleen <ak@linux.intel.com>
> > 
> > Add a missing field to the perf_event_attr debug output.
> > 
> > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Link: http://lkml.kernel.org/r/1445366797-30894-4-git-send-email-andi@firstfloor.org
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> > ---
> >  tools/perf/util/evsel.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> > index 8be867ccefe9..11bf3f2c51cd 100644
> > --- a/tools/perf/util/evsel.c
> > +++ b/tools/perf/util/evsel.c
> > @@ -1229,6 +1229,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
> >  	PRINT_ATTRf(config, p_hex);
> >  	PRINT_ATTRn("{ sample_period, sample_freq }", sample_period, p_unsigned);
> >  	PRINT_ATTRf(sample_type, p_sample_type);
> > +	PRINT_ATTRf(branch_sample_type, p_unsigned);
> >  	PRINT_ATTRf(read_format, p_read_format);
> 
> As said in the original thread, this is the wrong place, it should be
> between config2 and sample_regs_user.

Like below, right? Acked?

commit 528946c2fcb5cdd3b75b691b316b5bdeaa7d46d0
Author: Andi Kleen <ak@linux.intel.com>
Date:   Tue Oct 20 11:46:36 2015 -0700

    perf evsel: Print branch filter state with -vv
    
    Add a missing field to the perf_event_attr debug output.
    
    Signed-off-by: Andi Kleen <ak@linux.intel.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lkml.kernel.org/r/1445366797-30894-4-git-send-email-andi@firstfloor.org
    [ Print it between config2 and sample_regs_user (peterz)]
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 8be867ccefe9..ab05fa52a5cd 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1262,6 +1262,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
 	PRINT_ATTRf(bp_type, p_unsigned);
 	PRINT_ATTRn("{ bp_addr, config1 }", bp_addr, p_hex);
 	PRINT_ATTRn("{ bp_len, config2 }", bp_len, p_hex);
+	PRINT_ATTRf(branch_sample_type, p_unsigned);
 	PRINT_ATTRf(sample_regs_user, p_hex);
 	PRINT_ATTRf(sample_stack_user, p_unsigned);
 	PRINT_ATTRf(clockid, p_signed);

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

* Re: [PATCH 4/4] perf evsel: Print branch filter state with -vv
  2015-10-21 18:07     ` Arnaldo Carvalho de Melo
@ 2015-10-21 19:02       ` Peter Zijlstra
  0 siblings, 0 replies; 11+ messages in thread
From: Peter Zijlstra @ 2015-10-21 19:02 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: Ingo Molnar, linux-kernel, Andi Kleen, Jiri Olsa

On Wed, Oct 21, 2015 at 03:07:55PM -0300, Arnaldo Carvalho de Melo wrote:
> commit 528946c2fcb5cdd3b75b691b316b5bdeaa7d46d0
> Author: Andi Kleen <ak@linux.intel.com>
> Date:   Tue Oct 20 11:46:36 2015 -0700
> 
>     perf evsel: Print branch filter state with -vv
>     
>     Add a missing field to the perf_event_attr debug output.
>     
>     Signed-off-by: Andi Kleen <ak@linux.intel.com>
>     Cc: Jiri Olsa <jolsa@kernel.org>
>     Cc: Peter Zijlstra <peterz@infradead.org>
>     Link: http://lkml.kernel.org/r/1445366797-30894-4-git-send-email-andi@firstfloor.org
>     [ Print it between config2 and sample_regs_user (peterz)]
>     Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
> 
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index 8be867ccefe9..ab05fa52a5cd 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -1262,6 +1262,7 @@ int perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,
>  	PRINT_ATTRf(bp_type, p_unsigned);
>  	PRINT_ATTRn("{ bp_addr, config1 }", bp_addr, p_hex);
>  	PRINT_ATTRn("{ bp_len, config2 }", bp_len, p_hex);
> +	PRINT_ATTRf(branch_sample_type, p_unsigned);
>  	PRINT_ATTRf(sample_regs_user, p_hex);
>  	PRINT_ATTRf(sample_stack_user, p_unsigned);
>  	PRINT_ATTRf(clockid, p_signed);

Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>

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

end of thread, other threads:[~2015-10-21 19:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-20 20:25 [GIT PULL 0/4] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-10-20 20:25 ` [PATCH 1/4] perf build: Add fixdep to .gitignore Arnaldo Carvalho de Melo
2015-10-20 20:25 ` [PATCH 2/4] tools lib traceevent: update KVM plugin Arnaldo Carvalho de Melo
2015-10-20 20:25 ` [PATCH 3/4] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat Arnaldo Carvalho de Melo
2015-10-20 20:25 ` [PATCH 4/4] perf evsel: Print branch filter state with -vv Arnaldo Carvalho de Melo
2015-10-21  8:32   ` Peter Zijlstra
2015-10-21  9:25     ` Ingo Molnar
2015-10-21 13:22       ` Arnaldo Carvalho de Melo
2015-10-21 18:07     ` Arnaldo Carvalho de Melo
2015-10-21 19:02       ` Peter Zijlstra
2015-10-21  8:11 ` [GIT PULL 0/4] perf/core improvements and fixes Ingo Molnar

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.