Lines Matching refs:t

1103 	int t;  in record__free_thread_data()  local
1109 for (t = 0; t < rec->nr_threads; t++) { in record__free_thread_data()
1110 record__thread_data_close_pipes(&thread_data[t]); in record__free_thread_data()
1111 zfree(&thread_data[t].maps); in record__free_thread_data()
1112 zfree(&thread_data[t].overwrite_maps); in record__free_thread_data()
1113 fdarray__exit(&thread_data[t].pollfd); in record__free_thread_data()
1185 int t, ret; in record__alloc_thread_data() local
1195 for (t = 0; t < rec->nr_threads; t++) in record__alloc_thread_data()
1196 record__thread_data_init_pipes(&thread_data[t]); in record__alloc_thread_data()
1198 for (t = 0; t < rec->nr_threads; t++) { in record__alloc_thread_data()
1199 thread_data[t].rec = rec; in record__alloc_thread_data()
1200 thread_data[t].mask = &rec->thread_masks[t]; in record__alloc_thread_data()
1201 ret = record__thread_data_init_maps(&thread_data[t], evlist); in record__alloc_thread_data()
1203 pr_err("Failed to initialize thread[%d] maps\n", t); in record__alloc_thread_data()
1206 ret = record__thread_data_init_pollfd(&thread_data[t], evlist); in record__alloc_thread_data()
1208 pr_err("Failed to initialize thread[%d] pollfd\n", t); in record__alloc_thread_data()
1211 if (t) { in record__alloc_thread_data()
1212 thread_data[t].tid = -1; in record__alloc_thread_data()
1213 ret = record__thread_data_open_pipes(&thread_data[t]); in record__alloc_thread_data()
1215 pr_err("Failed to open thread[%d] communication pipes\n", t); in record__alloc_thread_data()
1218 ret = fdarray__add(&thread_data[t].pollfd, thread_data[t].pipes.msg[0], in record__alloc_thread_data()
1221 pr_err("Failed to add descriptor to thread[%d] pollfd\n", t); in record__alloc_thread_data()
1224 thread_data[t].ctlfd_pos = ret; in record__alloc_thread_data()
1226 thread_data, thread_data[t].ctlfd_pos, in record__alloc_thread_data()
1227 thread_data[t].pipes.msg[0]); in record__alloc_thread_data()
1229 thread_data[t].tid = gettid(); in record__alloc_thread_data()
1231 ret = record__dup_non_perf_events(rec, evlist, &thread_data[t]); in record__alloc_thread_data()
1235 thread_data[t].ctlfd_pos = -1; /* Not used */ in record__alloc_thread_data()
2209 int t, tt, err, ret = 0, nr_threads = rec->nr_threads; in record__start_threads() local
2229 for (t = 1; t < nr_threads; t++) { in record__start_threads()
2234 MMAP_CPU_MASK_BYTES(&(thread_data[t].mask->affinity)), in record__start_threads()
2235 (cpu_set_t *)(thread_data[t].mask->affinity.bits)); in record__start_threads()
2237 if (pthread_create(&handle, &attrs, record__thread, &thread_data[t])) { in record__start_threads()
2238 for (tt = 1; tt < t; tt++) in record__start_threads()
2239 record__terminate_thread(&thread_data[t]); in record__start_threads()
2245 err = read(thread_data[t].pipes.ack[0], &msg, sizeof(msg)); in record__start_threads()
2247 pr_debug2("threads[%d]: sent %s\n", rec->thread_data[t].tid, in record__start_threads()
2251 thread->tid, rec->thread_data[t].tid); in record__start_threads()
2272 int t; in record__stop_threads() local
2275 for (t = 1; t < rec->nr_threads; t++) in record__stop_threads()
2276 record__terminate_thread(&thread_data[t]); in record__stop_threads()
2278 for (t = 0; t < rec->nr_threads; t++) { in record__stop_threads()
2279 rec->samples += thread_data[t].samples; in record__stop_threads()
2282 rec->session->bytes_transferred += thread_data[t].bytes_transferred; in record__stop_threads()
2283 rec->session->bytes_compressed += thread_data[t].bytes_compressed; in record__stop_threads()
2284 pr_debug("threads[%d]: samples=%lld, wakes=%ld, ", thread_data[t].tid, in record__stop_threads()
2285 thread_data[t].samples, thread_data[t].waking); in record__stop_threads()
2286 if (thread_data[t].bytes_transferred && thread_data[t].bytes_compressed) in record__stop_threads()
2288 thread_data[t].bytes_transferred, thread_data[t].bytes_compressed); in record__stop_threads()
2290 pr_debug("written=%" PRIu64 "\n", thread_data[t].bytes_written); in record__stop_threads()
2298 int t; in record__waking() local
2302 for (t = 0; t < rec->nr_threads; t++) in record__waking()
2303 waking += thread_data[t].waking; in record__waking()
3565 int t; in record__free_thread_masks() local
3568 for (t = 0; t < nr_threads; t++) in record__free_thread_masks()
3569 record__thread_mask_free(&rec->thread_masks[t]); in record__free_thread_masks()
3576 int t, ret; in record__alloc_thread_masks() local
3584 for (t = 0; t < nr_threads; t++) { in record__alloc_thread_masks()
3585 ret = record__thread_mask_alloc(&rec->thread_masks[t], nr_bits); in record__alloc_thread_masks()
3587 pr_err("Failed to allocate thread masks[%d]\n", t); in record__alloc_thread_masks()
3602 int t, ret, nr_cpus = perf_cpu_map__nr(cpus); in record__init_thread_cpu_masks() local
3611 for (t = 0; t < rec->nr_threads; t++) { in record__init_thread_cpu_masks()
3612 __set_bit(perf_cpu_map__cpu(cpus, t).cpu, rec->thread_masks[t].maps.bits); in record__init_thread_cpu_masks()
3613 __set_bit(perf_cpu_map__cpu(cpus, t).cpu, rec->thread_masks[t].affinity.bits); in record__init_thread_cpu_masks()
3615 pr_debug("thread_masks[%d]: ", t); in record__init_thread_cpu_masks()
3616 mmap_cpu_mask__scnprintf(&rec->thread_masks[t].maps, "maps"); in record__init_thread_cpu_masks()
3617 pr_debug("thread_masks[%d]: ", t); in record__init_thread_cpu_masks()
3618 mmap_cpu_mask__scnprintf(&rec->thread_masks[t].affinity, "affinity"); in record__init_thread_cpu_masks()
3630 int ret = 0, t = 0; in record__init_thread_masks_spec() local
3703 thread_masks = realloc(rec->thread_masks, (t + 1) * sizeof(struct thread_mask)); in record__init_thread_masks_spec()
3710 rec->thread_masks[t] = thread_mask; in record__init_thread_masks_spec()
3712 pr_debug("thread_masks[%d]: ", t); in record__init_thread_masks_spec()
3713 mmap_cpu_mask__scnprintf(&rec->thread_masks[t].maps, "maps"); in record__init_thread_masks_spec()
3714 pr_debug("thread_masks[%d]: ", t); in record__init_thread_masks_spec()
3715 mmap_cpu_mask__scnprintf(&rec->thread_masks[t].affinity, "affinity"); in record__init_thread_masks_spec()
3717 t++; in record__init_thread_masks_spec()
3724 rec->nr_threads = t; in record__init_thread_masks_spec()
3809 int t, ret; in record__init_thread_user_masks() local
3814 for (t = 0, user_spec = (char *)rec->opts.threads_user_spec; ; t++, user_spec = NULL) { in record__init_thread_user_masks()
3818 pr_debug2("threads_spec[%d]: %s\n", t, spec); in record__init_thread_user_masks()