aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-20 09:02:51 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-10-20 09:02:51 -0400
commit9b00eb8ac2738b27a1469046f2ca76449dcdf04a (patch)
tree6a385f0ad652d414fa4e845b86f27a82b63f8928
parent270b77a0f30e7bc61a9081b86d74dbb62fa6a69d (diff)
parent20e8e72d0fa8e26202932c30d592bade73fdc701 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Ingo writes: "perf fixes: Misc perf tooling fixes." * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf tools: Stop fallbacking to kallsyms for vdso symbols lookup perf tools: Pass build flags to traceevent build perf report: Don't crash on invalid inline debug information perf cpu_map: Align cpu map synthesized events properly. perf tools: Fix tracing_path_mount proper path perf tools: Fix use of alternatives to find JDIR perf evsel: Store ids for events with their own cpus perf_event__synthesize_event_update_cpus perf vendor events intel: Fix wrong filter_band* values for uncore events Revert "perf tools: Fix PMU term format max value calculation" tools headers uapi: Sync kvm.h copy tools arch uapi: Sync the x86 kvm.h copy
-rw-r--r--tools/arch/x86/include/uapi/asm/kvm.h1
-rw-r--r--tools/include/uapi/linux/kvm.h1
-rw-r--r--tools/lib/api/fs/tracing_path.c4
-rw-r--r--tools/perf/Makefile.config2
-rw-r--r--tools/perf/Makefile.perf2
-rw-r--r--tools/perf/builtin-report.c1
-rw-r--r--tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json16
-rw-r--r--tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json16
-rw-r--r--tools/perf/util/event.c22
-rw-r--r--tools/perf/util/evsel.c3
-rw-r--r--tools/perf/util/pmu.c13
-rw-r--r--tools/perf/util/srcline.c3
12 files changed, 39 insertions, 45 deletions
diff --git a/tools/arch/x86/include/uapi/asm/kvm.h b/tools/arch/x86/include/uapi/asm/kvm.h
index 86299efa804a..fd23d5778ea1 100644
--- a/tools/arch/x86/include/uapi/asm/kvm.h
+++ b/tools/arch/x86/include/uapi/asm/kvm.h
@@ -377,6 +377,7 @@ struct kvm_sync_regs {
377 377
378#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0) 378#define KVM_X86_QUIRK_LINT0_REENABLED (1 << 0)
379#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1) 379#define KVM_X86_QUIRK_CD_NW_CLEARED (1 << 1)
380#define KVM_X86_QUIRK_LAPIC_MMIO_HOLE (1 << 2)
380 381
381#define KVM_STATE_NESTED_GUEST_MODE 0x00000001 382#define KVM_STATE_NESTED_GUEST_MODE 0x00000001
382#define KVM_STATE_NESTED_RUN_PENDING 0x00000002 383#define KVM_STATE_NESTED_RUN_PENDING 0x00000002
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 07548de5c988..251be353f950 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -952,6 +952,7 @@ struct kvm_ppc_resize_hpt {
952#define KVM_CAP_S390_HPAGE_1M 156 952#define KVM_CAP_S390_HPAGE_1M 156
953#define KVM_CAP_NESTED_STATE 157 953#define KVM_CAP_NESTED_STATE 157
954#define KVM_CAP_ARM_INJECT_SERROR_ESR 158 954#define KVM_CAP_ARM_INJECT_SERROR_ESR 158
955#define KVM_CAP_MSR_PLATFORM_INFO 159
955 956
956#ifdef KVM_CAP_IRQ_ROUTING 957#ifdef KVM_CAP_IRQ_ROUTING
957 958
diff --git a/tools/lib/api/fs/tracing_path.c b/tools/lib/api/fs/tracing_path.c
index 120037496f77..5afb11b30fca 100644
--- a/tools/lib/api/fs/tracing_path.c
+++ b/tools/lib/api/fs/tracing_path.c
@@ -36,7 +36,7 @@ static const char *tracing_path_tracefs_mount(void)
36 36
37 __tracing_path_set("", mnt); 37 __tracing_path_set("", mnt);
38 38
39 return mnt; 39 return tracing_path;
40} 40}
41 41
42static const char *tracing_path_debugfs_mount(void) 42static const char *tracing_path_debugfs_mount(void)
@@ -49,7 +49,7 @@ static const char *tracing_path_debugfs_mount(void)
49 49
50 __tracing_path_set("tracing/", mnt); 50 __tracing_path_set("tracing/", mnt);
51 51
52 return mnt; 52 return tracing_path;
53} 53}
54 54
55const char *tracing_path_mount(void) 55const char *tracing_path_mount(void)
diff --git a/tools/perf/Makefile.config b/tools/perf/Makefile.config
index f6d1a03c7523..e30d20fb482d 100644
--- a/tools/perf/Makefile.config
+++ b/tools/perf/Makefile.config
@@ -833,7 +833,7 @@ ifndef NO_JVMTI
833 JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}') 833 JDIR=$(shell /usr/sbin/update-java-alternatives -l | head -1 | awk '{print $$3}')
834 else 834 else
835 ifneq (,$(wildcard /usr/sbin/alternatives)) 835 ifneq (,$(wildcard /usr/sbin/alternatives))
836 JDIR=$(shell alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g') 836 JDIR=$(shell /usr/sbin/alternatives --display java | tail -1 | cut -d' ' -f 5 | sed 's%/jre/bin/java.%%g')
837 endif 837 endif
838 endif 838 endif
839 ifndef JDIR 839 ifndef JDIR
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 5224ade3d5af..0be411695379 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -635,7 +635,7 @@ $(LIBPERF_IN): prepare FORCE
635$(LIB_FILE): $(LIBPERF_IN) 635$(LIB_FILE): $(LIBPERF_IN)
636 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS) 636 $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIBPERF_IN) $(LIB_OBJS)
637 637
638LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 638LIBTRACEEVENT_FLAGS += plugin_dir=$(plugindir_SQ) 'EXTRA_CFLAGS=$(EXTRA_CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
639 639
640$(LIBTRACEEVENT): FORCE 640$(LIBTRACEEVENT): FORCE
641 $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a 641 $(Q)$(MAKE) -C $(TRACE_EVENT_DIR) $(LIBTRACEEVENT_FLAGS) O=$(OUTPUT) $(OUTPUT)libtraceevent.a
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 76e12bcd1765..b2188e623e22 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -981,6 +981,7 @@ int cmd_report(int argc, const char **argv)
981 .id_index = perf_event__process_id_index, 981 .id_index = perf_event__process_id_index,
982 .auxtrace_info = perf_event__process_auxtrace_info, 982 .auxtrace_info = perf_event__process_auxtrace_info,
983 .auxtrace = perf_event__process_auxtrace, 983 .auxtrace = perf_event__process_auxtrace,
984 .event_update = perf_event__process_event_update,
984 .feature = process_feature_event, 985 .feature = process_feature_event,
985 .ordered_events = true, 986 .ordered_events = true,
986 .ordering_requires_timestamps = true, 987 .ordering_requires_timestamps = true,
diff --git a/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json b/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
index d40498f2cb1e..635c09fda1d9 100644
--- a/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
+++ b/tools/perf/pmu-events/arch/x86/ivytown/uncore-power.json
@@ -188,7 +188,7 @@
188 "Counter": "0,1,2,3", 188 "Counter": "0,1,2,3",
189 "EventCode": "0xb", 189 "EventCode": "0xb",
190 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES", 190 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES",
191 "Filter": "filter_band0=1200", 191 "Filter": "filter_band0=12",
192 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 192 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
193 "MetricName": "freq_ge_1200mhz_cycles %", 193 "MetricName": "freq_ge_1200mhz_cycles %",
194 "PerPkg": "1", 194 "PerPkg": "1",
@@ -199,7 +199,7 @@
199 "Counter": "0,1,2,3", 199 "Counter": "0,1,2,3",
200 "EventCode": "0xc", 200 "EventCode": "0xc",
201 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES", 201 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES",
202 "Filter": "filter_band1=2000", 202 "Filter": "filter_band1=20",
203 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 203 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
204 "MetricName": "freq_ge_2000mhz_cycles %", 204 "MetricName": "freq_ge_2000mhz_cycles %",
205 "PerPkg": "1", 205 "PerPkg": "1",
@@ -210,7 +210,7 @@
210 "Counter": "0,1,2,3", 210 "Counter": "0,1,2,3",
211 "EventCode": "0xd", 211 "EventCode": "0xd",
212 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES", 212 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES",
213 "Filter": "filter_band2=3000", 213 "Filter": "filter_band2=30",
214 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 214 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
215 "MetricName": "freq_ge_3000mhz_cycles %", 215 "MetricName": "freq_ge_3000mhz_cycles %",
216 "PerPkg": "1", 216 "PerPkg": "1",
@@ -221,7 +221,7 @@
221 "Counter": "0,1,2,3", 221 "Counter": "0,1,2,3",
222 "EventCode": "0xe", 222 "EventCode": "0xe",
223 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES", 223 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES",
224 "Filter": "filter_band3=4000", 224 "Filter": "filter_band3=40",
225 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 225 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
226 "MetricName": "freq_ge_4000mhz_cycles %", 226 "MetricName": "freq_ge_4000mhz_cycles %",
227 "PerPkg": "1", 227 "PerPkg": "1",
@@ -232,7 +232,7 @@
232 "Counter": "0,1,2,3", 232 "Counter": "0,1,2,3",
233 "EventCode": "0xb", 233 "EventCode": "0xb",
234 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS", 234 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS",
235 "Filter": "edge=1,filter_band0=1200", 235 "Filter": "edge=1,filter_band0=12",
236 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 236 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
237 "MetricName": "freq_ge_1200mhz_cycles %", 237 "MetricName": "freq_ge_1200mhz_cycles %",
238 "PerPkg": "1", 238 "PerPkg": "1",
@@ -243,7 +243,7 @@
243 "Counter": "0,1,2,3", 243 "Counter": "0,1,2,3",
244 "EventCode": "0xc", 244 "EventCode": "0xc",
245 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS", 245 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS",
246 "Filter": "edge=1,filter_band1=2000", 246 "Filter": "edge=1,filter_band1=20",
247 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 247 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
248 "MetricName": "freq_ge_2000mhz_cycles %", 248 "MetricName": "freq_ge_2000mhz_cycles %",
249 "PerPkg": "1", 249 "PerPkg": "1",
@@ -254,7 +254,7 @@
254 "Counter": "0,1,2,3", 254 "Counter": "0,1,2,3",
255 "EventCode": "0xd", 255 "EventCode": "0xd",
256 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS", 256 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS",
257 "Filter": "edge=1,filter_band2=4000", 257 "Filter": "edge=1,filter_band2=30",
258 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 258 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
259 "MetricName": "freq_ge_3000mhz_cycles %", 259 "MetricName": "freq_ge_3000mhz_cycles %",
260 "PerPkg": "1", 260 "PerPkg": "1",
@@ -265,7 +265,7 @@
265 "Counter": "0,1,2,3", 265 "Counter": "0,1,2,3",
266 "EventCode": "0xe", 266 "EventCode": "0xe",
267 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS", 267 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS",
268 "Filter": "edge=1,filter_band3=4000", 268 "Filter": "edge=1,filter_band3=40",
269 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 269 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
270 "MetricName": "freq_ge_4000mhz_cycles %", 270 "MetricName": "freq_ge_4000mhz_cycles %",
271 "PerPkg": "1", 271 "PerPkg": "1",
diff --git a/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json b/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
index 16034bfd06dd..8755693d86c6 100644
--- a/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
+++ b/tools/perf/pmu-events/arch/x86/jaketown/uncore-power.json
@@ -187,7 +187,7 @@
187 "Counter": "0,1,2,3", 187 "Counter": "0,1,2,3",
188 "EventCode": "0xb", 188 "EventCode": "0xb",
189 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES", 189 "EventName": "UNC_P_FREQ_GE_1200MHZ_CYCLES",
190 "Filter": "filter_band0=1200", 190 "Filter": "filter_band0=12",
191 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 191 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
192 "MetricName": "freq_ge_1200mhz_cycles %", 192 "MetricName": "freq_ge_1200mhz_cycles %",
193 "PerPkg": "1", 193 "PerPkg": "1",
@@ -198,7 +198,7 @@
198 "Counter": "0,1,2,3", 198 "Counter": "0,1,2,3",
199 "EventCode": "0xc", 199 "EventCode": "0xc",
200 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES", 200 "EventName": "UNC_P_FREQ_GE_2000MHZ_CYCLES",
201 "Filter": "filter_band1=2000", 201 "Filter": "filter_band1=20",
202 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 202 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
203 "MetricName": "freq_ge_2000mhz_cycles %", 203 "MetricName": "freq_ge_2000mhz_cycles %",
204 "PerPkg": "1", 204 "PerPkg": "1",
@@ -209,7 +209,7 @@
209 "Counter": "0,1,2,3", 209 "Counter": "0,1,2,3",
210 "EventCode": "0xd", 210 "EventCode": "0xd",
211 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES", 211 "EventName": "UNC_P_FREQ_GE_3000MHZ_CYCLES",
212 "Filter": "filter_band2=3000", 212 "Filter": "filter_band2=30",
213 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 213 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
214 "MetricName": "freq_ge_3000mhz_cycles %", 214 "MetricName": "freq_ge_3000mhz_cycles %",
215 "PerPkg": "1", 215 "PerPkg": "1",
@@ -220,7 +220,7 @@
220 "Counter": "0,1,2,3", 220 "Counter": "0,1,2,3",
221 "EventCode": "0xe", 221 "EventCode": "0xe",
222 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES", 222 "EventName": "UNC_P_FREQ_GE_4000MHZ_CYCLES",
223 "Filter": "filter_band3=4000", 223 "Filter": "filter_band3=40",
224 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 224 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
225 "MetricName": "freq_ge_4000mhz_cycles %", 225 "MetricName": "freq_ge_4000mhz_cycles %",
226 "PerPkg": "1", 226 "PerPkg": "1",
@@ -231,7 +231,7 @@
231 "Counter": "0,1,2,3", 231 "Counter": "0,1,2,3",
232 "EventCode": "0xb", 232 "EventCode": "0xb",
233 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS", 233 "EventName": "UNC_P_FREQ_GE_1200MHZ_TRANSITIONS",
234 "Filter": "edge=1,filter_band0=1200", 234 "Filter": "edge=1,filter_band0=12",
235 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 235 "MetricExpr": "(UNC_P_FREQ_GE_1200MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
236 "MetricName": "freq_ge_1200mhz_cycles %", 236 "MetricName": "freq_ge_1200mhz_cycles %",
237 "PerPkg": "1", 237 "PerPkg": "1",
@@ -242,7 +242,7 @@
242 "Counter": "0,1,2,3", 242 "Counter": "0,1,2,3",
243 "EventCode": "0xc", 243 "EventCode": "0xc",
244 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS", 244 "EventName": "UNC_P_FREQ_GE_2000MHZ_TRANSITIONS",
245 "Filter": "edge=1,filter_band1=2000", 245 "Filter": "edge=1,filter_band1=20",
246 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 246 "MetricExpr": "(UNC_P_FREQ_GE_2000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
247 "MetricName": "freq_ge_2000mhz_cycles %", 247 "MetricName": "freq_ge_2000mhz_cycles %",
248 "PerPkg": "1", 248 "PerPkg": "1",
@@ -253,7 +253,7 @@
253 "Counter": "0,1,2,3", 253 "Counter": "0,1,2,3",
254 "EventCode": "0xd", 254 "EventCode": "0xd",
255 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS", 255 "EventName": "UNC_P_FREQ_GE_3000MHZ_TRANSITIONS",
256 "Filter": "edge=1,filter_band2=4000", 256 "Filter": "edge=1,filter_band2=30",
257 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 257 "MetricExpr": "(UNC_P_FREQ_GE_3000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
258 "MetricName": "freq_ge_3000mhz_cycles %", 258 "MetricName": "freq_ge_3000mhz_cycles %",
259 "PerPkg": "1", 259 "PerPkg": "1",
@@ -264,7 +264,7 @@
264 "Counter": "0,1,2,3", 264 "Counter": "0,1,2,3",
265 "EventCode": "0xe", 265 "EventCode": "0xe",
266 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS", 266 "EventName": "UNC_P_FREQ_GE_4000MHZ_TRANSITIONS",
267 "Filter": "edge=1,filter_band3=4000", 267 "Filter": "edge=1,filter_band3=40",
268 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.", 268 "MetricExpr": "(UNC_P_FREQ_GE_4000MHZ_CYCLES / UNC_P_CLOCKTICKS) * 100.",
269 "MetricName": "freq_ge_4000mhz_cycles %", 269 "MetricName": "freq_ge_4000mhz_cycles %",
270 "PerPkg": "1", 270 "PerPkg": "1",
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 0cd42150f712..bc646185f8d9 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -1081,6 +1081,7 @@ void *cpu_map_data__alloc(struct cpu_map *map, size_t *size, u16 *type, int *max
1081 } 1081 }
1082 1082
1083 *size += sizeof(struct cpu_map_data); 1083 *size += sizeof(struct cpu_map_data);
1084 *size = PERF_ALIGN(*size, sizeof(u64));
1084 return zalloc(*size); 1085 return zalloc(*size);
1085} 1086}
1086 1087
@@ -1560,26 +1561,9 @@ struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr,
1560 1561
1561 return NULL; 1562 return NULL;
1562 } 1563 }
1563try_again: 1564
1564 al->map = map_groups__find(mg, al->addr); 1565 al->map = map_groups__find(mg, al->addr);
1565 if (al->map == NULL) { 1566 if (al->map != NULL) {
1566 /*
1567 * If this is outside of all known maps, and is a negative
1568 * address, try to look it up in the kernel dso, as it might be
1569 * a vsyscall or vdso (which executes in user-mode).
1570 *
1571 * XXX This is nasty, we should have a symbol list in the
1572 * "[vdso]" dso, but for now lets use the old trick of looking
1573 * in the whole kernel symbol list.
1574 */
1575 if (cpumode == PERF_RECORD_MISC_USER && machine &&
1576 mg != &machine->kmaps &&
1577 machine__kernel_ip(machine, al->addr)) {
1578 mg = &machine->kmaps;
1579 load_map = true;
1580 goto try_again;
1581 }
1582 } else {
1583 /* 1567 /*
1584 * Kernel maps might be changed when loading symbols so loading 1568 * Kernel maps might be changed when loading symbols so loading
1585 * must be done prior to using kernel maps. 1569 * must be done prior to using kernel maps.
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1a61628a1c12..e596ae358c4d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1089,6 +1089,9 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts,
1089 attr->exclude_user = 1; 1089 attr->exclude_user = 1;
1090 } 1090 }
1091 1091
1092 if (evsel->own_cpus)
1093 evsel->attr.read_format |= PERF_FORMAT_ID;
1094
1092 /* 1095 /*
1093 * Apply event specific term settings, 1096 * Apply event specific term settings,
1094 * it overloads any global configuration. 1097 * it overloads any global configuration.
diff --git a/tools/perf/util/pmu.c b/tools/perf/util/pmu.c
index afd68524ffa9..7799788f662f 100644
--- a/tools/perf/util/pmu.c
+++ b/tools/perf/util/pmu.c
@@ -930,13 +930,14 @@ static void pmu_format_value(unsigned long *format, __u64 value, __u64 *v,
930 930
931static __u64 pmu_format_max_value(const unsigned long *format) 931static __u64 pmu_format_max_value(const unsigned long *format)
932{ 932{
933 __u64 w = 0; 933 int w;
934 int fbit;
935
936 for_each_set_bit(fbit, format, PERF_PMU_FORMAT_BITS)
937 w |= (1ULL << fbit);
938 934
939 return w; 935 w = bitmap_weight(format, PERF_PMU_FORMAT_BITS);
936 if (!w)
937 return 0;
938 if (w < 64)
939 return (1ULL << w) - 1;
940 return -1;
940} 941}
941 942
942/* 943/*
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 09d6746e6ec8..e767c4a9d4d2 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -85,6 +85,9 @@ static struct symbol *new_inline_sym(struct dso *dso,
85 struct symbol *inline_sym; 85 struct symbol *inline_sym;
86 char *demangled = NULL; 86 char *demangled = NULL;
87 87
88 if (!funcname)
89 funcname = "??";
90
88 if (dso) { 91 if (dso) {
89 demangled = dso__demangle_sym(dso, 0, funcname); 92 demangled = dso__demangle_sym(dso, 0, funcname);
90 if (demangled) 93 if (demangled)