X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=tools%2Fperf%2Futil%2Fevsel.c;h=cda44b0e821c63baea1f9da52123184768fdd2f4;hb=caa164e37374609056c4d25255a6c7bef7a7f43b;hp=e4f7902d5afa62f0aecab1103bc05ca4bcb226e9;hpb=23416e230416a9201561f1db553b1515e9959f6a;p=karo-tx-linux.git diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index e4f7902d5afa..cda44b0e821c 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c @@ -273,8 +273,20 @@ struct perf_evsel *perf_evsel__new_cycles(void) struct perf_evsel *evsel; event_attr_init(&attr); + /* + * Unnamed union member, not supported as struct member named + * initializer in older compilers such as gcc 4.4.7 + * + * Just for probing the precise_ip: + */ + attr.sample_period = 1; perf_event_attr__set_max_precise_ip(&attr); + /* + * Now let the usual logic to set up the perf_event_attr defaults + * to kick in when we return and before perf_evsel__open() is called. + */ + attr.sample_period = 0; evsel = perf_evsel__new(&attr); if (evsel == NULL)