Lines Matching defs:thread

248 static int evsel__write_stat_event(struct evsel *counter, int cpu_map_idx, u32 thread,
251 struct perf_sample_id *sid = SID(counter, cpu_map_idx, thread);
254 return perf_event__synthesize_stat(NULL, cpu, thread, sid->id, count,
259 int thread, struct timespec *rs)
265 perf_counts(counter->counts, cpu_map_idx, thread);
274 perf_counts(counter->counts, cpu_map_idx, thread);
285 return evsel__read_counter(counter, cpu_map_idx, thread);
299 int thread;
304 for (thread = 0; thread < nthreads; thread++) {
307 count = perf_counts(counter->counts, cpu_map_idx, thread);
313 if (!perf_counts__is_loaded(counter->counts, cpu_map_idx, thread) &&
314 read_single_counter(counter, cpu_map_idx, thread, rs)) {
316 perf_counts(counter->counts, cpu_map_idx, thread)->ena = 0;
317 perf_counts(counter->counts, cpu_map_idx, thread)->run = 0;
321 perf_counts__set_loaded(counter->counts, cpu_map_idx, thread, false);
324 if (evsel__write_stat_event(counter, cpu_map_idx, thread, count)) {
644 * For global --per-thread case, skip current
645 * error thread.
1156 "stat events on existing thread id"),
1228 OPT_SET_UINT(0, "per-thread", &stat_config.aggr_mode,
1229 "aggregate counts per thread", AGGR_THREAD),
1257 OPT_BOOLEAN(0, "percore-show-thread", &stat_config.percore_show_thread,
1259 "counts of one hardware thread by sum up total hardware "
1418 [AGGR_THREAD] = "thread",
2358 pr_warning("Extra thread map event, ignoring.\n");
2556 fprintf(stderr, "--metric-only is not supported with --per-thread\n");
2660 fprintf(stderr, "The --per-thread option is only "
2662 "options or only --per-thread.\n");
2671 * --per-thread is aggregated per thread, we dont mix it with cpu mode