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 fixes from Ingo Molnar:
"Tooling fixes, three Intel uncore driver fixes, plus an AUX events fix
uncovered by the perf fuzzer"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/x86/intel/uncore: Remove PCIe3 unit for SNR
perf/x86/intel/uncore: Fix missing marker for snr_uncore_imc_freerunning_events
perf/x86/intel/uncore: Add PCI ID of IMC for Xeon E3 V5 Family
perf: Correctly handle failed perf_get_aux_event()
perf hists: Fix variable name's inconsistency in hists__for_each() macro
perf map: Set kmap->kmaps backpointer for main kernel map chunks
perf report: Fix incorrectly added dimensions as switch perf data file
tools lib traceevent: Fix memory leakage in filter_event

+22 -29
+6
arch/x86/events/intel/uncore_snb.c
··· 15 15 #define PCI_DEVICE_ID_INTEL_SKL_HQ_IMC 0x1910 16 16 #define PCI_DEVICE_ID_INTEL_SKL_SD_IMC 0x190f 17 17 #define PCI_DEVICE_ID_INTEL_SKL_SQ_IMC 0x191f 18 + #define PCI_DEVICE_ID_INTEL_SKL_E3_IMC 0x1918 18 19 #define PCI_DEVICE_ID_INTEL_KBL_Y_IMC 0x590c 19 20 #define PCI_DEVICE_ID_INTEL_KBL_U_IMC 0x5904 20 21 #define PCI_DEVICE_ID_INTEL_KBL_UQ_IMC 0x5914 ··· 659 658 .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), 660 659 }, 661 660 { /* IMC */ 661 + PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_SKL_E3_IMC), 662 + .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), 663 + }, 664 + { /* IMC */ 662 665 PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_KBL_Y_IMC), 663 666 .driver_data = UNCORE_PCI_DEV_DATA(SNB_PCI_UNCORE_IMC, 0), 664 667 }, ··· 831 826 IMC_DEV(SKL_HQ_IMC, &skl_uncore_pci_driver), /* 6th Gen Core H Quad Core */ 832 827 IMC_DEV(SKL_SD_IMC, &skl_uncore_pci_driver), /* 6th Gen Core S Dual Core */ 833 828 IMC_DEV(SKL_SQ_IMC, &skl_uncore_pci_driver), /* 6th Gen Core S Quad Core */ 829 + IMC_DEV(SKL_E3_IMC, &skl_uncore_pci_driver), /* Xeon E3 V5 Gen Core processor */ 834 830 IMC_DEV(KBL_Y_IMC, &skl_uncore_pci_driver), /* 7th Gen Core Y */ 835 831 IMC_DEV(KBL_U_IMC, &skl_uncore_pci_driver), /* 7th Gen Core U */ 836 832 IMC_DEV(KBL_UQ_IMC, &skl_uncore_pci_driver), /* 7th Gen Core U Quad Core */
+1 -24
arch/x86/events/intel/uncore_snbep.c
··· 369 369 #define SNR_M2M_PCI_PMON_BOX_CTL 0x438 370 370 #define SNR_M2M_PCI_PMON_UMASK_EXT 0xff 371 371 372 - /* SNR PCIE3 */ 373 - #define SNR_PCIE3_PCI_PMON_CTL0 0x508 374 - #define SNR_PCIE3_PCI_PMON_CTR0 0x4e8 375 - #define SNR_PCIE3_PCI_PMON_BOX_CTL 0x4e4 376 - 377 372 /* SNR IMC */ 378 373 #define SNR_IMC_MMIO_PMON_FIXED_CTL 0x54 379 374 #define SNR_IMC_MMIO_PMON_FIXED_CTR 0x38 ··· 4323 4328 .format_group = &snr_m2m_uncore_format_group, 4324 4329 }; 4325 4330 4326 - static struct intel_uncore_type snr_uncore_pcie3 = { 4327 - .name = "pcie3", 4328 - .num_counters = 4, 4329 - .num_boxes = 1, 4330 - .perf_ctr_bits = 48, 4331 - .perf_ctr = SNR_PCIE3_PCI_PMON_CTR0, 4332 - .event_ctl = SNR_PCIE3_PCI_PMON_CTL0, 4333 - .event_mask = SNBEP_PMON_RAW_EVENT_MASK, 4334 - .box_ctl = SNR_PCIE3_PCI_PMON_BOX_CTL, 4335 - .ops = &ivbep_uncore_pci_ops, 4336 - .format_group = &ivbep_uncore_format_group, 4337 - }; 4338 - 4339 4331 enum { 4340 4332 SNR_PCI_UNCORE_M2M, 4341 - SNR_PCI_UNCORE_PCIE3, 4342 4333 }; 4343 4334 4344 4335 static struct intel_uncore_type *snr_pci_uncores[] = { 4345 4336 [SNR_PCI_UNCORE_M2M] = &snr_uncore_m2m, 4346 - [SNR_PCI_UNCORE_PCIE3] = &snr_uncore_pcie3, 4347 4337 NULL, 4348 4338 }; 4349 4339 ··· 4336 4356 { /* M2M */ 4337 4357 PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x344a), 4338 4358 .driver_data = UNCORE_PCI_DEV_FULL_DATA(12, 0, SNR_PCI_UNCORE_M2M, 0), 4339 - }, 4340 - { /* PCIe3 */ 4341 - PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x334a), 4342 - .driver_data = UNCORE_PCI_DEV_FULL_DATA(4, 0, SNR_PCI_UNCORE_PCIE3, 0), 4343 4359 }, 4344 4360 { /* end: all zeroes */ } 4345 4361 }; ··· 4512 4536 INTEL_UNCORE_EVENT_DESC(write, "event=0xff,umask=0x21"), 4513 4537 INTEL_UNCORE_EVENT_DESC(write.scale, "3.814697266e-6"), 4514 4538 INTEL_UNCORE_EVENT_DESC(write.unit, "MiB"), 4539 + { /* end: all zeroes */ }, 4515 4540 }; 4516 4541 4517 4542 static struct intel_uncore_ops snr_uncore_imc_freerunning_ops = {
+3 -1
kernel/events/core.c
··· 11465 11465 } 11466 11466 } 11467 11467 11468 - if (perf_need_aux_event(event) && !perf_get_aux_event(event, group_leader)) 11468 + if (perf_need_aux_event(event) && !perf_get_aux_event(event, group_leader)) { 11469 + err = -EINVAL; 11469 11470 goto err_locked; 11471 + } 11470 11472 11471 11473 /* 11472 11474 * Must be under the same ctx::mutex as perf_install_in_context(),
+3 -1
tools/lib/traceevent/parse-filter.c
··· 1228 1228 } 1229 1229 1230 1230 filter_type = add_filter_type(filter, event->id); 1231 - if (filter_type == NULL) 1231 + if (filter_type == NULL) { 1232 + free_arg(arg); 1232 1233 return TEP_ERRNO__MEM_ALLOC_FAILED; 1234 + } 1233 1235 1234 1236 if (filter_type->filter) 1235 1237 free_arg(filter_type->filter);
+4 -1
tools/perf/builtin-report.c
··· 1076 1076 struct stat st; 1077 1077 bool has_br_stack = false; 1078 1078 int branch_mode = -1; 1079 + int last_key = 0; 1079 1080 bool branch_call_mode = false; 1080 1081 #define CALLCHAIN_DEFAULT_OPT "graph,0.5,caller,function,percent" 1081 1082 static const char report_callchain_help[] = "Display call graph (stack chain/backtrace):\n\n" ··· 1451 1450 sort_order = sort_tmp; 1452 1451 } 1453 1452 1454 - if (setup_sorting(session->evlist) < 0) { 1453 + if ((last_key != K_SWITCH_INPUT_DATA) && 1454 + (setup_sorting(session->evlist) < 0)) { 1455 1455 if (sort_order) 1456 1456 parse_options_usage(report_usage, options, "s", 1); 1457 1457 if (field_order) ··· 1532 1530 ret = __cmd_report(&report); 1533 1531 if (ret == K_SWITCH_INPUT_DATA) { 1534 1532 perf_session__delete(session); 1533 + last_key = K_SWITCH_INPUT_DATA; 1535 1534 goto repeat; 1536 1535 } else 1537 1536 ret = 0;
+2 -2
tools/perf/util/hist.h
··· 339 339 list_for_each_entry_safe(format, tmp, &(_list)->sorts, sort_list) 340 340 341 341 #define hists__for_each_format(hists, format) \ 342 - perf_hpp_list__for_each_format((hists)->hpp_list, fmt) 342 + perf_hpp_list__for_each_format((hists)->hpp_list, format) 343 343 344 344 #define hists__for_each_sort_list(hists, format) \ 345 - perf_hpp_list__for_each_sort_list((hists)->hpp_list, fmt) 345 + perf_hpp_list__for_each_sort_list((hists)->hpp_list, format) 346 346 347 347 extern struct perf_hpp_fmt perf_hpp__format[]; 348 348
+3
tools/perf/util/symbol-elf.c
··· 920 920 if (curr_map == NULL) 921 921 return -1; 922 922 923 + if (curr_dso->kernel) 924 + map__kmap(curr_map)->kmaps = kmaps; 925 + 923 926 if (adjust_kernel_syms) { 924 927 curr_map->start = shdr->sh_addr + ref_reloc(kmap); 925 928 curr_map->end = curr_map->start + shdr->sh_size;