Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf updates from Thomas Gleixner:
"Another set of perf updates:

- Fix a Skylake Uncore event format declaration

- Prevent perf pipe mode from crahsing which was caused by a missing
buffer allocation

- Make the perf top popup message which tells the user that it uses
fallback mode on older kernels a debug message.

- Make perf context rescheduling work correcctly

- Robustify the jump error drawing in perf browser mode so it does
not try to create references to NULL initialized offset entries

- Make trigger_on() robust so it does not enable the trigger before
everything is set up correctly to handle it

- Make perf auxtrace respect the --no-itrace option so it does not
try to queue AUX data for decoding.

- Prevent having different number of field separators in CVS output
lines when a counter is not supported.

- Make the perf kallsyms man page usage behave like it does for all
other perf commands.

- Synchronize the kernel headers"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/core: Fix ctx_event_type in ctx_resched()
perf tools: Fix trigger class trigger_on()
perf auxtrace: Prevent decoding when --no-itrace
perf stat: Fix CVS output format for non-supported counters
tools headers: Sync x86's cpufeatures.h
tools headers: Sync copy of kvm UAPI headers
perf record: Fix crash in pipe mode
perf annotate browser: Be more robust when drawing jump arrows
perf top: Fix annoying fallback message on older kernels
perf kallsyms: Fix the usage on the man page
perf/x86/intel/uncore: Fix Skylake UPI event format

+65 -17
+1 -1
arch/x86/events/intel/uncore_snbep.c
··· 3606 3606 }; 3607 3607 3608 3608 static struct attribute *skx_upi_uncore_formats_attr[] = { 3609 - &format_attr_event_ext.attr, 3609 + &format_attr_event.attr, 3610 3610 &format_attr_umask_ext.attr, 3611 3611 &format_attr_edge.attr, 3612 3612 &format_attr_inv.attr,
+3 -1
kernel/events/core.c
··· 2246 2246 struct perf_event_context *task_ctx, 2247 2247 enum event_type_t event_type) 2248 2248 { 2249 - enum event_type_t ctx_event_type = event_type & EVENT_ALL; 2249 + enum event_type_t ctx_event_type; 2250 2250 bool cpu_event = !!(event_type & EVENT_CPU); 2251 2251 2252 2252 /* ··· 2255 2255 */ 2256 2256 if (event_type & EVENT_PINNED) 2257 2257 event_type |= EVENT_FLEXIBLE; 2258 + 2259 + ctx_event_type = event_type & EVENT_ALL; 2258 2260 2259 2261 perf_pmu_disable(cpuctx->ctx.pmu); 2260 2262 if (task_ctx)
+1
tools/arch/x86/include/asm/cpufeatures.h
··· 213 213 #define X86_FEATURE_SEV ( 7*32+20) /* AMD Secure Encrypted Virtualization */ 214 214 215 215 #define X86_FEATURE_USE_IBPB ( 7*32+21) /* "" Indirect Branch Prediction Barrier enabled */ 216 + #define X86_FEATURE_USE_IBRS_FW ( 7*32+22) /* "" Use IBRS during runtime firmware calls */ 216 217 217 218 /* Virtualization flags: Linux defined, word 8 */ 218 219 #define X86_FEATURE_TPR_SHADOW ( 8*32+ 0) /* Intel TPR Shadow */
+2
tools/include/uapi/linux/kvm.h
··· 761 761 #define KVM_TRACE_PAUSE __KVM_DEPRECATED_MAIN_0x07 762 762 #define KVM_TRACE_DISABLE __KVM_DEPRECATED_MAIN_0x08 763 763 #define KVM_GET_EMULATED_CPUID _IOWR(KVMIO, 0x09, struct kvm_cpuid2) 764 + #define KVM_GET_MSR_FEATURE_INDEX_LIST _IOWR(KVMIO, 0x0a, struct kvm_msr_list) 764 765 765 766 /* 766 767 * Extension capability list. ··· 935 934 #define KVM_CAP_S390_AIS_MIGRATION 150 936 935 #define KVM_CAP_PPC_GET_CPU_CHAR 151 937 936 #define KVM_CAP_S390_BPB 152 937 + #define KVM_CAP_GET_MSR_FEATURES 153 938 938 939 939 #ifdef KVM_CAP_IRQ_ROUTING 940 940
+1 -1
tools/perf/Documentation/perf-kallsyms.txt
··· 8 8 SYNOPSIS 9 9 -------- 10 10 [verse] 11 - 'perf kallsyms <options> symbol_name[,symbol_name...]' 11 + 'perf kallsyms' [<options>] symbol_name[,symbol_name...] 12 12 13 13 DESCRIPTION 14 14 -----------
+9
tools/perf/builtin-record.c
··· 881 881 } 882 882 } 883 883 884 + /* 885 + * If we have just single event and are sending data 886 + * through pipe, we need to force the ids allocation, 887 + * because we synthesize event name through the pipe 888 + * and need the id for that. 889 + */ 890 + if (data->is_pipe && rec->evlist->nr_entries == 1) 891 + rec->opts.sample_id = true; 892 + 884 893 if (record__open(rec) != 0) { 885 894 err = -1; 886 895 goto out_child;
+1 -1
tools/perf/builtin-stat.c
··· 917 917 char buf[64], *vals, *ends; 918 918 919 919 if (unit == NULL || fmt == NULL) { 920 - fprintf(out, "%s%s%s%s", csv_sep, csv_sep, csv_sep, csv_sep); 920 + fprintf(out, "%s%s", csv_sep, csv_sep); 921 921 return; 922 922 } 923 923 snprintf(buf, sizeof(buf), fmt, val);
+1 -1
tools/perf/builtin-top.c
··· 991 991 evlist__for_each_entry(evlist, counter) 992 992 counter->attr.write_backward = false; 993 993 opts->overwrite = false; 994 - ui__warning("fall back to non-overwrite mode\n"); 994 + pr_debug2("fall back to non-overwrite mode\n"); 995 995 return 1; 996 996 } 997 997
+1
tools/perf/perf.h
··· 61 61 bool tail_synthesize; 62 62 bool overwrite; 63 63 bool ignore_missing_thread; 64 + bool sample_id; 64 65 unsigned int freq; 65 66 unsigned int mmap_pages; 66 67 unsigned int auxtrace_mmap_pages;
+25
tools/perf/ui/browsers/annotate.c
··· 327 327 if (!disasm_line__is_valid_jump(cursor, sym)) 328 328 return; 329 329 330 + /* 331 + * This first was seen with a gcc function, _cpp_lex_token, that 332 + * has the usual jumps: 333 + * 334 + * │1159e6c: ↓ jne 115aa32 <_cpp_lex_token@@Base+0xf92> 335 + * 336 + * I.e. jumps to a label inside that function (_cpp_lex_token), and 337 + * those works, but also this kind: 338 + * 339 + * │1159e8b: ↓ jne c469be <cpp_named_operator2name@@Base+0xa72> 340 + * 341 + * I.e. jumps to another function, outside _cpp_lex_token, which 342 + * are not being correctly handled generating as a side effect references 343 + * to ab->offset[] entries that are set to NULL, so to make this code 344 + * more robust, check that here. 345 + * 346 + * A proper fix for will be put in place, looking at the function 347 + * name right after the '<' token and probably treating this like a 348 + * 'call' instruction. 349 + */ 330 350 target = ab->offsets[cursor->ops.target.offset]; 351 + if (target == NULL) { 352 + ui_helpline__printf("WARN: jump target inconsistency, press 'o', ab->offsets[%#x] = NULL\n", 353 + cursor->ops.target.offset); 354 + return; 355 + } 331 356 332 357 bcursor = browser_line(&cursor->al); 333 358 btarget = browser_line(target);
+9 -6
tools/perf/util/auxtrace.c
··· 60 60 #include "sane_ctype.h" 61 61 #include "symbol/kallsyms.h" 62 62 63 + static bool auxtrace__dont_decode(struct perf_session *session) 64 + { 65 + return !session->itrace_synth_opts || 66 + session->itrace_synth_opts->dont_decode; 67 + } 68 + 63 69 int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, 64 70 struct auxtrace_mmap_params *mp, 65 71 void *userpg, int fd) ··· 768 762 size_t i; 769 763 int err; 770 764 765 + if (auxtrace__dont_decode(session)) 766 + return 0; 767 + 771 768 list_for_each_entry(auxtrace_index, &session->auxtrace_index, list) { 772 769 for (i = 0; i < auxtrace_index->nr; i++) { 773 770 ent = &auxtrace_index->entries[i]; ··· 899 890 out_free: 900 891 free(ev); 901 892 return err; 902 - } 903 - 904 - static bool auxtrace__dont_decode(struct perf_session *session) 905 - { 906 - return !session->itrace_synth_opts || 907 - session->itrace_synth_opts->dont_decode; 908 893 } 909 894 910 895 int perf_event__process_auxtrace_info(struct perf_tool *tool __maybe_unused,
+6 -2
tools/perf/util/record.c
··· 137 137 struct perf_evsel *evsel; 138 138 bool use_sample_identifier = false; 139 139 bool use_comm_exec; 140 + bool sample_id = opts->sample_id; 140 141 141 142 /* 142 143 * Set the evsel leader links before we configure attributes, ··· 164 163 * match the id. 165 164 */ 166 165 use_sample_identifier = perf_can_sample_identifier(); 167 - evlist__for_each_entry(evlist, evsel) 168 - perf_evsel__set_sample_id(evsel, use_sample_identifier); 166 + sample_id = true; 169 167 } else if (evlist->nr_entries > 1) { 170 168 struct perf_evsel *first = perf_evlist__first(evlist); 171 169 ··· 174 174 use_sample_identifier = perf_can_sample_identifier(); 175 175 break; 176 176 } 177 + sample_id = true; 178 + } 179 + 180 + if (sample_id) { 177 181 evlist__for_each_entry(evlist, evsel) 178 182 perf_evsel__set_sample_id(evsel, use_sample_identifier); 179 183 }
+5 -4
tools/perf/util/trigger.h
··· 12 12 * States and transits: 13 13 * 14 14 * 15 - * OFF--(on)--> READY --(hit)--> HIT 15 + * OFF--> ON --> READY --(hit)--> HIT 16 16 * ^ | 17 17 * | (ready) 18 18 * | | ··· 27 27 volatile enum { 28 28 TRIGGER_ERROR = -2, 29 29 TRIGGER_OFF = -1, 30 - TRIGGER_READY = 0, 31 - TRIGGER_HIT = 1, 30 + TRIGGER_ON = 0, 31 + TRIGGER_READY = 1, 32 + TRIGGER_HIT = 2, 32 33 } state; 33 34 const char *name; 34 35 }; ··· 51 50 static inline void trigger_on(struct trigger *t) 52 51 { 53 52 TRIGGER_WARN_ONCE(t, TRIGGER_OFF); 54 - t->state = TRIGGER_READY; 53 + t->state = TRIGGER_ON; 55 54 } 56 55 57 56 static inline void trigger_ready(struct trigger *t)