* [PATCH 1/5] perf build: Add fixdep to .gitignore
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
@ 2015-10-21 21:31 ` Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 2/5] tools lib traceevent: update KVM plugin Arnaldo Carvalho de Melo
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 21:31 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] 7+ messages in thread
* [PATCH 2/5] tools lib traceevent: update KVM plugin
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 1/5] perf build: Add fixdep to .gitignore Arnaldo Carvalho de Melo
@ 2015-10-21 21:31 ` Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 3/5] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat Arnaldo Carvalho de Melo
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 21:31 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] 7+ messages in thread
* [PATCH 3/5] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 1/5] perf build: Add fixdep to .gitignore Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 2/5] tools lib traceevent: update KVM plugin Arnaldo Carvalho de Melo
@ 2015-10-21 21:31 ` Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 4/5] perf evsel: Print branch filter state with -vv Arnaldo Carvalho de Melo
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 21:31 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] 7+ messages in thread
* [PATCH 4/5] perf evsel: Print branch filter state with -vv
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (2 preceding siblings ...)
2015-10-21 21:31 ` [PATCH 3/5] perf cpu_map: Fix core dump caused by per-socket/core system-wide stat Arnaldo Carvalho de Melo
@ 2015-10-21 21:31 ` Arnaldo Carvalho de Melo
2015-10-21 21:31 ` [PATCH 5/5] perf annotate: Add debug message for out of bounds sample Arnaldo Carvalho de Melo
2015-10-22 7:34 ` [GIT PULL 0/5] perf/core improvements and fixes Ingo Molnar
5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 21:31 UTC (permalink / raw)
To: Ingo Molnar; +Cc: linux-kernel, Andi Kleen, Jiri Olsa, 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>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Jiri Olsa <jolsa@kernel.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>
---
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..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);
--
2.1.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 5/5] perf annotate: Add debug message for out of bounds sample
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (3 preceding siblings ...)
2015-10-21 21:31 ` [PATCH 4/5] perf evsel: Print branch filter state with -vv Arnaldo Carvalho de Melo
@ 2015-10-21 21:31 ` Arnaldo Carvalho de Melo
2015-10-22 7:34 ` [GIT PULL 0/5] perf/core improvements and fixes Ingo Molnar
5 siblings, 0 replies; 7+ messages in thread
From: Arnaldo Carvalho de Melo @ 2015-10-21 21:31 UTC (permalink / raw)
To: Ingo Molnar
Cc: linux-kernel, Arnaldo Carvalho de Melo, Adrian Hunter,
Borislav Petkov, David Ahern, Frederic Weisbecker, Jiri Olsa,
Namhyung Kim, Stephane Eranian, Wang Nan
From: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-q0lde9ajs84oi38nlyjcqbwg@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/util/annotate.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index d1eece70b84d..0fc8d7a2fea5 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -548,8 +548,11 @@ static int __symbol__inc_addr_samples(struct symbol *sym, struct map *map,
pr_debug3("%s: addr=%#" PRIx64 "\n", __func__, map->unmap_ip(map, addr));
- if (addr < sym->start || addr >= sym->end)
+ if (addr < sym->start || addr >= sym->end) {
+ pr_debug("%s(%d): ERANGE! sym->name=%s, start=%#" PRIx64 ", addr=%#" PRIx64 ", end=%#" PRIx64 "\n",
+ __func__, __LINE__, sym->name, sym->start, addr, sym->end);
return -ERANGE;
+ }
offset = addr - sym->start;
h = annotation__histogram(notes, evidx);
--
2.1.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [GIT PULL 0/5] perf/core improvements and fixes
2015-10-21 21:31 [GIT PULL 0/5] perf/core improvements and fixes Arnaldo Carvalho de Melo
` (4 preceding siblings ...)
2015-10-21 21:31 ` [PATCH 5/5] perf annotate: Add debug message for out of bounds sample Arnaldo Carvalho de Melo
@ 2015-10-22 7:34 ` Ingo Molnar
5 siblings, 0 replies; 7+ messages in thread
From: Ingo Molnar @ 2015-10-22 7:34 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: linux-kernel, Adrian Hunter, Alexei Starovoitov, Andi Kleen,
Borislav Petkov, David Ahern, Frederic Weisbecker, Jiri Olsa,
Kan Liang, kvm, Masami Hiramatsu, Namhyung Kim, Paolo Bonzini,
Paul Mackerras, Peter Zijlstra, Stephane Eranian, 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 e3d006ce8180a0c025ce66bdc89bbc125f85be57:
>
> perf annotate: Add debug message for out of bounds sample (2015-10-21 18:12:37 -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
>
> Arnaldo Carvalho de Melo (1):
> perf annotate: Add debug message for out of bounds sample
>
> 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/annotate.c | 5 ++++-
> tools/perf/util/cpumap.c | 2 +-
> tools/perf/util/evsel.c | 1 +
> 5 files changed, 24 insertions(+), 10 deletions(-)
> create mode 100644 tools/build/.gitignore
Pulled, thanks a lot Arnaldo!
Ingo
^ permalink raw reply [flat|nested] 7+ messages in thread