Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1210350
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH RFC 05/10] perf,tools: Enable statistic read for perf record |
| Date | 2015-08-20 11:50 +0200 |
| Message-ID | <pZuDU-15a-19@gated-at.bofh.it> (permalink) |
| References | <pYSfg-3x6-7@gated-at.bofh.it> <pYSfh-3x6-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Aug 18, 2015 at 05:25:41AM -0400, kan.liang@intel.com 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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH RFC 05/10] perf,tools: Enable statistic read for perf record kan.liang@intel.com - 2015-08-18 18:50 +0200 Re: [PATCH RFC 05/10] perf,tools: Enable statistic read for perf record Jiri Olsa <jolsa@redhat.com> - 2015-08-20 11:50 +0200 Re: [PATCH RFC 05/10] perf,tools: Enable statistic read for perf record Jiri Olsa <jolsa@redhat.com> - 2015-08-20 11:50 +0200
csiph-web