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/linux-2.6-tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
perf tools: Add group event scheduling option to perf record/stat
MAINTAINERS: Fix list of perf events source files
perf tools: Fix build against newer glibc
perf tools: Fix error handling of unknown events
perf evlist: Fix missing event name init for default event
perf list: Fix exit value

+26 -8
+1 -1
MAINTAINERS
··· 4971 4971 M: Ingo Molnar <mingo@elte.hu> 4972 4972 M: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> 4973 4973 S: Supported 4974 - F: kernel/perf_event*.c 4974 + F: kernel/events/* 4975 4975 F: include/linux/perf_event.h 4976 4976 F: arch/*/kernel/perf_event*.c 4977 4977 F: arch/*/kernel/*/perf_event*.c
+3 -1
tools/perf/builtin-record.c
··· 45 45 static int output; 46 46 static int pipe_output = 0; 47 47 static const char *output_name = NULL; 48 - static int group = 0; 48 + static bool group = false; 49 49 static int realtime_prio = 0; 50 50 static bool nodelay = false; 51 51 static bool raw_samples = false; ··· 753 753 "child tasks do not inherit counters"), 754 754 OPT_UINTEGER('F', "freq", &user_freq, "profile at this frequency"), 755 755 OPT_UINTEGER('m', "mmap-pages", &mmap_pages, "number of mmap data pages"), 756 + OPT_BOOLEAN(0, "group", &group, 757 + "put the counters into a counter group"), 756 758 OPT_BOOLEAN('g', "call-graph", &call_graph, 757 759 "do call-graph (stack chain/backtrace) recording"), 758 760 OPT_INCR('v', "verbose", &verbose,
+5 -2
tools/perf/builtin-stat.c
··· 193 193 static const char *cpu_list; 194 194 static const char *csv_sep = NULL; 195 195 static bool csv_output = false; 196 + static bool group = false; 196 197 197 198 static volatile int done = 0; 198 199 ··· 281 280 attr->inherit = !no_inherit; 282 281 283 282 if (system_wide) 284 - return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, false); 283 + return perf_evsel__open_per_cpu(evsel, evsel_list->cpus, group); 285 284 286 285 if (target_pid == -1 && target_tid == -1) { 287 286 attr->disabled = 1; 288 287 attr->enable_on_exec = 1; 289 288 } 290 289 291 - return perf_evsel__open_per_thread(evsel, evsel_list->threads, false); 290 + return perf_evsel__open_per_thread(evsel, evsel_list->threads, group); 292 291 } 293 292 294 293 /* ··· 1044 1043 "stat events on existing thread id"), 1045 1044 OPT_BOOLEAN('a', "all-cpus", &system_wide, 1046 1045 "system-wide collection from all CPUs"), 1046 + OPT_BOOLEAN('g', "group", &group, 1047 + "put the counters into a counter group"), 1047 1048 OPT_BOOLEAN('c', "scale", &scale, 1048 1049 "scale/normalize counters"), 1049 1050 OPT_INCR('v', "verbose", &verbose,
+10 -1
tools/perf/util/evlist.c
··· 85 85 struct perf_evsel *evsel = perf_evsel__new(&attr, 0); 86 86 87 87 if (evsel == NULL) 88 - return -ENOMEM; 88 + goto error; 89 + 90 + /* use strdup() because free(evsel) assumes name is allocated */ 91 + evsel->name = strdup("cycles"); 92 + if (!evsel->name) 93 + goto error_free; 89 94 90 95 perf_evlist__add(evlist, evsel); 91 96 return 0; 97 + error_free: 98 + perf_evsel__delete(evsel); 99 + error: 100 + return -ENOMEM; 92 101 } 93 102 94 103 void perf_evlist__disable(struct perf_evlist *evlist)
+2
tools/perf/util/include/linux/compiler.h
··· 5 5 #define __always_inline inline 6 6 #endif 7 7 #define __user 8 + #ifndef __attribute_const__ 8 9 #define __attribute_const__ 10 + #endif 9 11 10 12 #define __used __attribute__((__unused__)) 11 13
+5 -3
tools/perf/util/parse-events.c
··· 697 697 return EVT_FAILED; 698 698 n = hex2u64(str + 1, &config); 699 699 if (n > 0) { 700 - *strp = str + n + 1; 700 + const char *end = str + n + 1; 701 + if (*end != '\0' && *end != ',' && *end != ':') 702 + return EVT_FAILED; 703 + 704 + *strp = end; 701 705 attr->type = PERF_TYPE_RAW; 702 706 attr->config = config; 703 707 return EVT_HANDLED; ··· 1101 1097 printf("\n"); 1102 1098 1103 1099 print_tracepoint_events(NULL, NULL); 1104 - 1105 - exit(129); 1106 1100 }