On Tue, Aug 18, 2015 at 05:25:41AM -0400, [email protected] wrote:
SNIP
> evlist__for_each(evlist, pos) {
> +
> + if (pos->stat_read) {
> + if (!target__has_cpu(&opts->target)) {
> + pos->stat_read = 0;
> + ui__warning("Statistics read only available "
> + "on system-wide/CPU mode. "
> + "Remove :N modifier for event %s\n",
> + pos->name);
> + goto out;
> + }
> + /* Don't do stat read for Group leader */
> + if ((pos->leader == pos) && (pos->leader->nr_members >
> 1))
> + pos->stat_read = 0;
> + else {
> + if (first == pos) {
> + pos->stat_read = 0;
> + ui__warning("The first event cannot "
> + "be stat read event\n");
> + goto out;
> + }
> + attr = &pos->attr;
> + attr->read_format =
> PERF_FORMAT_TOTAL_TIME_ENABLED |
> +
> PERF_FORMAT_TOTAL_TIME_RUNNING;
> + attr->sample_freq = 0;
> + attr->sample_period = 0;
> + attr->sample_type = 0;
> + pos->sample_size = 0;
> + }
> + }
seems like this should go under perf_evsel__config
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/