evsel.c (c8b5f2c96d1bf6cefcbe12f67dce0b892fe20512) | evsel.c (5496bc0c0d255f2a8a3a4c36087eb3b72ff63ea0) |
---|---|
1/* 2 * Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> 3 * 4 * Parts came from builtin-{top,stat,record}.c, see those files for further 5 * copyright notes. 6 * 7 * Released under the GPL v2. (and only v2, not any later version) 8 */ --- 186 unchanged lines hidden (view full) --- 195 perf_evsel__reset_sample_bit(evsel, ID); 196 perf_evsel__set_sample_bit(evsel, IDENTIFIER); 197 } else { 198 perf_evsel__set_sample_bit(evsel, ID); 199 } 200 evsel->attr.read_format |= PERF_FORMAT_ID; 201} 202 | 1/* 2 * Copyright (C) 2011, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com> 3 * 4 * Parts came from builtin-{top,stat,record}.c, see those files for further 5 * copyright notes. 6 * 7 * Released under the GPL v2. (and only v2, not any later version) 8 */ --- 186 unchanged lines hidden (view full) --- 195 perf_evsel__reset_sample_bit(evsel, ID); 196 perf_evsel__set_sample_bit(evsel, IDENTIFIER); 197 } else { 198 perf_evsel__set_sample_bit(evsel, ID); 199 } 200 evsel->attr.read_format |= PERF_FORMAT_ID; 201} 202 |
203/** 204 * perf_evsel__is_function_event - Return whether given evsel is a function 205 * trace event 206 * 207 * @evsel - evsel selector to be tested 208 * 209 * Return %true if event is function trace event 210 */ 211bool perf_evsel__is_function_event(struct perf_evsel *evsel) 212{ 213#define FUNCTION_EVENT "ftrace:function" 214 215 return evsel->name && 216 !strncmp(FUNCTION_EVENT, evsel->name, sizeof(FUNCTION_EVENT)); 217 218#undef FUNCTION_EVENT 219} 220 |
|
203void perf_evsel__init(struct perf_evsel *evsel, 204 struct perf_event_attr *attr, int idx) 205{ 206 evsel->idx = idx; 207 evsel->tracking = !idx; 208 evsel->attr = *attr; 209 evsel->leader = evsel; 210 evsel->unit = ""; --- 2221 unchanged lines hidden --- | 221void perf_evsel__init(struct perf_evsel *evsel, 222 struct perf_event_attr *attr, int idx) 223{ 224 evsel->idx = idx; 225 evsel->tracking = !idx; 226 evsel->attr = *attr; 227 evsel->leader = evsel; 228 evsel->unit = ""; --- 2221 unchanged lines hidden --- |