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

* 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf tools: Fix tracepoint id to string perf.data header table
perf tools: Fix handling of wildcards in tracepoint event selectors
powerpc: perf: Fix frequency calculation for overflowing counters

+4 -30
+1
arch/powerpc/kernel/perf_event.c
··· 1212 1212 if (left <= 0) 1213 1213 left = period; 1214 1214 record = 1; 1215 + event->hw.last_period = event->hw.sample_period; 1215 1216 } 1216 1217 if (left < 0x80000000LL) 1217 1218 val = 0x80000000LL - left;
+2
tools/perf/builtin-record.c
··· 936 936 list_for_each_entry(pos, &evsel_list, node) { 937 937 if (perf_evsel__alloc_fd(pos, cpus->nr, threads->nr) < 0) 938 938 goto out_free_fd; 939 + if (perf_header__push_event(pos->attr.config, event_name(pos))) 940 + goto out_free_fd; 939 941 } 940 942 event_array = malloc((sizeof(struct pollfd) * MAX_NR_CPUS * 941 943 MAX_COUNTERS * threads->nr));
+1 -30
tools/perf/util/parse-events.c
··· 490 490 return EVT_HANDLED_ALL; 491 491 } 492 492 493 - static int store_event_type(const char *orgname) 494 - { 495 - char filename[PATH_MAX], *c; 496 - FILE *file; 497 - int id, n; 498 - 499 - sprintf(filename, "%s/", debugfs_path); 500 - strncat(filename, orgname, strlen(orgname)); 501 - strcat(filename, "/id"); 502 - 503 - c = strchr(filename, ':'); 504 - if (c) 505 - *c = '/'; 506 - 507 - file = fopen(filename, "r"); 508 - if (!file) 509 - return 0; 510 - n = fscanf(file, "%i", &id); 511 - fclose(file); 512 - if (n < 1) { 513 - pr_err("cannot store event ID\n"); 514 - return -EINVAL; 515 - } 516 - return perf_header__push_event(id, orgname); 517 - } 518 - 519 493 static enum event_result parse_tracepoint_event(const char **strp, 520 494 struct perf_event_attr *attr) 521 495 { ··· 529 555 if (evt_length >= MAX_EVENT_LENGTH) 530 556 return EVT_FAILED; 531 557 if (strpbrk(evt_name, "*?")) { 532 - *strp += strlen(sys_name) + evt_length; 558 + *strp += strlen(sys_name) + evt_length + 1; /* 1 == the ':' */ 533 559 return parse_multiple_tracepoint_event(sys_name, evt_name, 534 560 flags); 535 561 } else { 536 - if (store_event_type(evt_name) < 0) 537 - return EVT_FAILED; 538 - 539 562 return parse_single_tracepoint_event(sys_name, evt_name, 540 563 evt_length, attr, strp); 541 564 }