Lines Matching defs:thread
268 static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread,
271 struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread);
274 return perf_event__synthesize_stat(NULL, cpu, thread, sid->id, count,
279 int thread, struct timespec *rs)
285 perf_counts(counter->counts, cpu_map_idx, thread);
294 perf_counts(counter->counts, cpu_map_idx, thread);
305 return evsel__read_counter(counter, cpu_map_idx, thread);
319 int thread;
324 for (thread = 0; thread < nthreads; thread++) {
327 count = perf_counts(counter->counts, cpu_map_idx, thread);
333 if (!perf_counts__is_loaded(counter->counts, cpu_map_idx, thread) &&
334 read_single_counter(counter, cpu_map_idx, thread, rs)) {
336 perf_counts(counter->counts, cpu_map_idx, thread)->ena = 0;
337 perf_counts(counter->counts, cpu_map_idx, thread)->run = 0;
341 perf_counts__set_loaded(counter->counts, cpu_map_idx, thread, false);
344 if (evsel__write_stat_event(counter, cpu_map_idx, thread, count)) {
664 * For global --per-thread case, skip current
665 * error thread.
1176 "stat events on existing thread id"),
1245 OPT_SET_UINT(0, "per-thread", &stat_config.aggr_mode,
1246 "aggregate counts per thread", AGGR_THREAD),
1274 OPT_BOOLEAN(0, "percore-show-thread", &stat_config.percore_show_thread,
1276 "counts of one hardware thread by sum up total hardware "
1435 [AGGR_THREAD] = "thread",
2340 pr_warning("Extra thread map event, ignoring.\n");
2536 fprintf(stderr, "--metric-only is not supported with --per-thread\n");
2640 fprintf(stderr, "The --per-thread option is only "
2642 "options or only --per-thread.\n");
2651 * --per-thread is aggregated per thread, we dont mix it with cpu mode