Lines Matching defs:thread
121 static __thread struct record_thread *thread;
252 thread->bytes_written += size;
640 thread->samples++;
1138 pr_err("Failed to duplicate descriptor in main thread pollfd\n");
1145 pr_err("Failed to map thread and evlist pollfd indexes\n");
1159 pr_err("Failed to allocate thread data\n");
1172 pr_err("Failed to initialize thread[%d] maps\n", t);
1177 pr_err("Failed to initialize thread[%d] pollfd\n", t);
1184 pr_err("Failed to open thread[%d] communication pipes\n", t);
1190 pr_err("Failed to add descriptor to thread[%d] pollfd\n", t);
1468 !bitmap_equal(thread->mask->affinity.bits, map->affinity_mask.bits,
1469 thread->mask->affinity.nbits)) {
1470 bitmap_zero(thread->mask->affinity.bits, thread->mask->affinity.nbits);
1471 bitmap_or(thread->mask->affinity.bits, thread->mask->affinity.bits,
1472 map->affinity_mask.bits, thread->mask->affinity.nbits);
1473 sched_setaffinity(0, MMAP_CPU_MASK_BYTES(&thread->mask->affinity),
1474 (cpu_set_t *)thread->mask->affinity.bits);
1476 pr_debug("threads[%d]: running on cpu%d: ", thread->tid, sched_getcpu());
1477 mmap_cpu_mask__scnprintf(&thread->mask->affinity, "affinity");
1512 thread->bytes_transferred += src_size;
1513 thread->bytes_compressed += compressed;
1536 nr_mmaps = thread->nr_mmaps;
1537 maps = overwrite ? thread->overwrite_maps : thread->maps;
1633 thread = arg;
1634 thread->tid = gettid();
1636 err = write(thread->pipes.ack[1], &msg, sizeof(msg));
1639 thread->tid, strerror(errno));
1641 pr_debug("threads[%d]: started on cpu%d\n", thread->tid, sched_getcpu());
1643 pollfd = &thread->pollfd;
1644 ctlfd_pos = thread->ctlfd_pos;
1647 unsigned long long hits = thread->samples;
1649 if (record__mmap_read_all(thread->rec, false) < 0 || terminate)
1652 if (hits == thread->samples) {
1661 thread->waking++;
1670 close(thread->pipes.msg[0]);
1671 thread->pipes.msg[0] = -1;
1678 record__mmap_read_all(thread->rec, true);
1680 err = write(thread->pipes.ack[1], &msg, sizeof(msg));
1683 thread->tid, strerror(errno));
2044 pr_err("Couldn't synthesize thread map.\n");
2110 * to the main thread.
2133 pr_debug("Couldn't start the BPF side band thread:\nBPF programs starting from now on won't be annotatable\n");
2200 thread->tid, tid);
2213 thread = &thread_data[0];
2249 thread->tid, rec->thread_data[t].tid);
2252 sched_setaffinity(0, MMAP_CPU_MASK_BYTES(&thread->mask->affinity),
2253 (cpu_set_t *)thread->mask->affinity.bits);
2255 pr_debug("threads[%d]: started on cpu%d\n", thread->tid, sched_getcpu());
2584 unsigned long long hits = thread->samples;
2639 thread->waking = 0;
2653 if (hits == thread->samples) {
2656 err = fdarray__poll(&thread->pollfd, -1);
2663 thread->waking++;
2665 if (fdarray__filter(&thread->pollfd, POLLERR | POLLHUP,
2669 err = record__update_evlist_pollfd_from_thread(rec, rec->evlist, thread);
3144 * thread to its parent.
3332 "record events on existing thread id"),
3374 "per thread counts"),
3420 OPT_BOOLEAN(0, "per-thread", &record.opts.target.per_thread,
3421 "use per-thread mmaps"),
3438 "per thread proc mmap processing timeout in ms"),
3484 "Set affinity mask of trace reading thread to NUMA node cpu mask or cpu of processed mmap buffer",
3493 OPT_UINTEGER(0, "num-thread-synthesize",
3576 pr_err("Failed to allocate thread masks\n");
3583 pr_err("Failed to allocate thread masks[%d]\n", t);
3650 pr_err("Failed to allocate thread mask\n");
3657 pr_err("Failed to initialize maps thread mask\n");
3662 pr_err("Failed to initialize affinity thread mask\n");
3701 pr_err("Failed to reallocate thread masks\n");
3716 pr_err("Failed to allocate thread mask\n");
3834 pr_err("Invalid thread maps or affinity specs\n");
3898 pr_err("--per-thread option is mutually exclusive to parallel streaming mode.\n");
4136 pr_err("Couldn't create thread/CPU maps: %s\n",