/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | thread_map.c | 35 struct perf_thread_map *threads; in thread_map__new_by_pid() local 46 threads = thread_map__alloc(items); in thread_map__new_by_pid() 47 if (threads != NULL) { in thread_map__new_by_pid() 49 perf_thread_map__set_pid(threads, i, atoi(namelist[i]->d_name)); in thread_map__new_by_pid() 50 threads->nr = items; in thread_map__new_by_pid() 51 refcount_set(&threads->refcnt, 1); in thread_map__new_by_pid() 58 return threads; in thread_map__new_by_pid() 63 struct perf_thread_map *threads = thread_map__alloc(1); in thread_map__new_by_tid() local 65 if (threads != NULL) { in thread_map__new_by_tid() 66 perf_thread_map__set_pid(threads, in thread_map__new_by_tid() 80 struct perf_thread_map *threads = thread_map__alloc(max_threads); __thread_map__new_all_cpus() local 183 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_pid_str() local 245 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_tid_str() local 307 thread_map__fprintf(struct perf_thread_map *threads, FILE *fp) thread_map__fprintf() argument 363 thread_map__read_comms(struct perf_thread_map *threads) thread_map__read_comms() argument 371 thread_map__copy_event(struct perf_thread_map *threads, struct perf_record_thread_map *event) thread_map__copy_event() argument 388 struct perf_thread_map *threads; thread_map__new_event() local 397 thread_map__has(struct perf_thread_map *threads, pid_t pid) thread_map__has() argument 409 thread_map__remove(struct perf_thread_map *threads, int idx) thread_map__remove() argument [all...] |
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | thread_map.c | 36 struct perf_thread_map *threads; in thread_map__new_by_pid() local 47 threads = thread_map__alloc(items); in thread_map__new_by_pid() 48 if (threads != NULL) { in thread_map__new_by_pid() 50 perf_thread_map__set_pid(threads, i, atoi(namelist[i]->d_name)); in thread_map__new_by_pid() 51 threads->nr = items; in thread_map__new_by_pid() 52 refcount_set(&threads->refcnt, 1); in thread_map__new_by_pid() 59 return threads; in thread_map__new_by_pid() 64 struct perf_thread_map *threads = thread_map__alloc(1); in thread_map__new_by_tid() local 66 if (threads != NULL) { in thread_map__new_by_tid() 67 perf_thread_map__set_pid(threads, in thread_map__new_by_tid() 81 struct perf_thread_map *threads = thread_map__alloc(max_threads); __thread_map__new_all_cpus() local 184 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_pid_str() local 246 struct perf_thread_map *threads = NULL, *nt; thread_map__new_by_tid_str() local 308 thread_map__fprintf(struct perf_thread_map *threads, FILE *fp) thread_map__fprintf() argument 364 thread_map__read_comms(struct perf_thread_map *threads) thread_map__read_comms() argument 372 thread_map__copy_event(struct perf_thread_map *threads, struct perf_record_thread_map *event) thread_map__copy_event() argument 389 struct perf_thread_map *threads; thread_map__new_event() local 398 thread_map__has(struct perf_thread_map *threads, pid_t pid) thread_map__has() argument 410 thread_map__remove(struct perf_thread_map *threads, int idx) thread_map__remove() argument [all...] |
/kernel/linux/linux-5.10/tools/perf/tests/ |
H A D | thread-map.c | 68 struct perf_thread_map *threads; in process_event() local 74 threads = thread_map__new_event(&event->thread_map); in process_event() 75 TEST_ASSERT_VAL("failed to alloc map", threads); in process_event() 77 TEST_ASSERT_VAL("wrong nr", threads->nr == 1); in process_event() 79 perf_thread_map__pid(threads, 0) == getpid()); in process_event() 81 perf_thread_map__comm(threads, 0) && in process_event() 82 !strcmp(perf_thread_map__comm(threads, 0), NAME)); in process_event() 84 refcount_read(&threads->refcnt) == 1); in process_event() 85 perf_thread_map__put(threads); in process_event() 91 struct perf_thread_map *threads; in test__thread_map_synthesize() local 110 struct perf_thread_map *threads; test__thread_map_remove() local [all...] |
H A D | event-times.c | 62 struct perf_thread_map *threads; in attach__current_disabled() local 67 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_disabled() 68 if (threads == NULL) { in attach__current_disabled() 75 err = evsel__open_per_thread(evsel, threads); in attach__current_disabled() 81 perf_thread_map__put(threads); in attach__current_disabled() 88 struct perf_thread_map *threads; in attach__current_enabled() local 93 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_enabled() 94 if (threads == NULL) { in attach__current_enabled() 99 err = evsel__open_per_thread(evsel, threads); in attach__current_enabled() 101 perf_thread_map__put(threads); in attach__current_enabled() [all...] |
/kernel/linux/linux-6.6/tools/perf/tests/ |
H A D | thread-map.c | 69 struct perf_thread_map *threads; in process_event() local 75 threads = thread_map__new_event(&event->thread_map); in process_event() 76 TEST_ASSERT_VAL("failed to alloc map", threads); in process_event() 78 TEST_ASSERT_VAL("wrong nr", threads->nr == 1); in process_event() 80 perf_thread_map__pid(threads, 0) == getpid()); in process_event() 82 perf_thread_map__comm(threads, 0) && in process_event() 83 !strcmp(perf_thread_map__comm(threads, 0), NAME)); in process_event() 85 refcount_read(&threads->refcnt) == 1); in process_event() 86 perf_thread_map__put(threads); in process_event() 92 struct perf_thread_map *threads; in test__thread_map_synthesize() local 112 struct perf_thread_map *threads; test__thread_map_remove() local [all...] |
H A D | event-times.c | 62 struct perf_thread_map *threads; in attach__current_disabled() local 67 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_disabled() 68 if (threads == NULL) { in attach__current_disabled() 75 err = evsel__open_per_thread(evsel, threads); in attach__current_disabled() 81 perf_thread_map__put(threads); in attach__current_disabled() 88 struct perf_thread_map *threads; in attach__current_enabled() local 93 threads = thread_map__new(-1, getpid(), UINT_MAX); in attach__current_enabled() 94 if (threads == NULL) { in attach__current_enabled() 99 err = evsel__open_per_thread(evsel, threads); in attach__current_enabled() 101 perf_thread_map__put(threads); in attach__current_enabled() [all...] |
/kernel/linux/linux-6.6/tools/lib/perf/tests/ |
H A D | test-threadmap.c | 16 struct perf_thread_map *threads; in test_threadmap_array() local 19 threads = perf_thread_map__new_array(nr, array); in test_threadmap_array() 20 __T("Failed to allocate new thread map", threads); in test_threadmap_array() 22 __T("Unexpected number of threads", perf_thread_map__nr(threads) == nr); in test_threadmap_array() 26 perf_thread_map__pid(threads, i) == (array ? array[i] : -1)); in test_threadmap_array() 30 perf_thread_map__set_pid(threads, i, i * 100); in test_threadmap_array() 33 perf_thread_map__pid(threads, 0) == (array ? array[0] : -1)); in test_threadmap_array() 37 perf_thread_map__pid(threads, i) == i * 100); in test_threadmap_array() 40 perf_thread_map__put(threads); in test_threadmap_array() 48 struct perf_thread_map *threads; test_threadmap() local [all...] |
H A D | test-evsel.c | 56 struct perf_thread_map *threads; in test_stat_thread() local 64 threads = perf_thread_map__new_dummy(); in test_stat_thread() 65 __T("failed to create threads", threads); in test_stat_thread() 67 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread() 72 err = perf_evsel__open(evsel, NULL, threads); in test_stat_thread() 81 perf_thread_map__put(threads); in test_stat_thread() 88 struct perf_thread_map *threads; in test_stat_thread_enable() local 97 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable() 98 __T("failed to create threads", thread in test_stat_thread_enable() 130 struct perf_thread_map *threads; test_stat_user_read() local 195 test_stat_read_format_single(struct perf_event_attr *attr, struct perf_thread_map *threads) test_stat_read_format_single() argument 230 test_stat_read_format_group(struct perf_event_attr *attr, struct perf_thread_map *threads) test_stat_read_format_group() argument 293 struct perf_thread_map *threads; test_stat_read_format() local [all...] |
H A D | test-evlist.c | 95 struct perf_thread_map *threads; in test_stat_thread() local 108 threads = perf_thread_map__new_dummy(); in test_stat_thread() 109 __T("failed to create threads", threads); in test_stat_thread() 111 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread() 130 perf_evlist__set_maps(evlist, NULL, threads); in test_stat_thread() 143 perf_thread_map__put(threads); in test_stat_thread() 150 struct perf_thread_map *threads; in test_stat_thread_enable() local 165 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable() 166 __T("failed to create threads", thread in test_stat_thread_enable() 219 struct perf_thread_map *threads; test_mmap_thread() local 443 struct perf_thread_map *threads; test_stat_multiplexing() local [all...] |
/kernel/linux/linux-5.10/tools/lib/perf/ |
H A D | threadmap.c | 47 struct perf_thread_map *threads = thread_map__alloc(1); in perf_thread_map__new_dummy() local 49 if (threads != NULL) { in perf_thread_map__new_dummy() 50 perf_thread_map__set_pid(threads, 0, -1); in perf_thread_map__new_dummy() 51 threads->nr = 1; in perf_thread_map__new_dummy() 52 refcount_set(&threads->refcnt, 1); in perf_thread_map__new_dummy() 54 return threads; in perf_thread_map__new_dummy() 57 static void perf_thread_map__delete(struct perf_thread_map *threads) in perf_thread_map__delete() argument 59 if (threads) { in perf_thread_map__delete() 62 WARN_ONCE(refcount_read(&threads->refcnt) != 0, in perf_thread_map__delete() 64 for (i = 0; i < threads in perf_thread_map__delete() 83 perf_thread_map__nr(struct perf_thread_map *threads) perf_thread_map__nr() argument [all...] |
/kernel/linux/linux-6.6/tools/lib/perf/ |
H A D | threadmap.c | 47 struct perf_thread_map *threads = thread_map__alloc(nr_threads); in perf_thread_map__new_array() local 50 if (!threads) in perf_thread_map__new_array() 54 perf_thread_map__set_pid(threads, i, array ? array[i] : -1); in perf_thread_map__new_array() 56 threads->nr = nr_threads; in perf_thread_map__new_array() 57 refcount_set(&threads->refcnt, 1); in perf_thread_map__new_array() 59 return threads; in perf_thread_map__new_array() 67 static void perf_thread_map__delete(struct perf_thread_map *threads) in perf_thread_map__delete() argument 69 if (threads) { in perf_thread_map__delete() 72 WARN_ONCE(refcount_read(&threads->refcnt) != 0, in perf_thread_map__delete() 74 for (i = 0; i < threads in perf_thread_map__delete() 93 perf_thread_map__nr(struct perf_thread_map *threads) perf_thread_map__nr() argument [all...] |
/kernel/linux/linux-5.10/tools/lib/perf/tests/ |
H A D | test-evsel.c | 52 struct perf_thread_map *threads; in test_stat_thread() local 60 threads = perf_thread_map__new_dummy(); in test_stat_thread() 61 __T("failed to create threads", threads); in test_stat_thread() 63 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread() 68 err = perf_evsel__open(evsel, NULL, threads); in test_stat_thread() 77 perf_thread_map__put(threads); in test_stat_thread() 84 struct perf_thread_map *threads; in test_stat_thread_enable() local 93 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable() 94 __T("failed to create threads", thread in test_stat_thread_enable() [all...] |
H A D | test-threadmap.c | 15 struct perf_thread_map *threads; in main() local 21 threads = perf_thread_map__new_dummy(); in main() 22 if (!threads) in main() 25 perf_thread_map__get(threads); in main() 26 perf_thread_map__put(threads); in main() 27 perf_thread_map__put(threads); in main()
|
H A D | test-evlist.c | 85 struct perf_thread_map *threads; in test_stat_thread() local 98 threads = perf_thread_map__new_dummy(); in test_stat_thread() 99 __T("failed to create threads", threads); in test_stat_thread() 101 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread() 116 perf_evlist__set_maps(evlist, NULL, threads); in test_stat_thread() 129 perf_thread_map__put(threads); in test_stat_thread() 136 struct perf_thread_map *threads; in test_stat_thread_enable() local 151 threads = perf_thread_map__new_dummy(); in test_stat_thread_enable() 152 __T("failed to create threads", thread in test_stat_thread_enable() 201 struct perf_thread_map *threads; test_mmap_thread() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/dma/ |
H A D | dma_map_benchmark.c | 29 int threads = 1, seconds = 20, node = -1; in main() local 41 threads = atoi(optarg); in main() 66 if (threads <= 0 || threads > DMA_MAP_MAX_THREADS) { in main() 67 fprintf(stderr, "invalid number of threads, must be in 1-%d\n", in main() 109 map.threads = threads; in main() 121 printf("dma mapping benchmark: threads:%d seconds:%d node:%d dir:%s granule: %d\n", in main() 122 threads, seconds, node, dir[directions], granule); in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/powerpc/math/ |
H A D | vmx_signal.c | 28 * worker threads 95 int i, j, rc, threads; in test_signal_vmx() local 102 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_vmx() 103 tids = malloc(threads * sizeof(pthread_t)); in test_signal_vmx() 107 threads_starting = threads; in test_signal_vmx() 108 for (i = 0; i < threads; i++) { in test_signal_vmx() 114 printf("\tWaiting for %d workers to start... %d", threads, threads_starting); in test_signal_vmx() 122 printf("\tSending signals to all threads %d times...", ITERATIONS); in test_signal_vmx() 124 for (j = 0; j < threads; j++) { in test_signal_vmx() 133 for (i = 0; i < threads; in test_signal_vmx() [all...] |
H A D | vmx_preempt.c | 8 * no way to be sure preemption happened so this test just uses many threads 28 * worker threads 59 int i, rc, threads; in test_preempt_vmx() local 65 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vmx() 66 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vmx() 70 threads_starting = threads; in test_preempt_vmx() 71 for (i = 0; i < threads; i++) { in test_preempt_vmx() 93 for (i = 0; i < threads; i++) { in test_preempt_vmx()
|
H A D | fpu_preempt.c | 8 * no way to be sure preemption happened so this test just uses many threads 28 * worker threads 58 int i, rc, threads; in test_preempt_fpu() local 61 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_fpu() 62 tids = malloc((threads) * sizeof(pthread_t)); in test_preempt_fpu() 66 threads_starting = threads; in test_preempt_fpu() 67 for (i = 0; i < threads; i++) { in test_preempt_fpu() 89 for (i = 0; i < threads; i++) { in test_preempt_fpu()
|
H A D | fpu_signal.c | 26 * worker threads 77 int i, j, rc, threads; in test_signal_fpu() local 81 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_fpu() 82 tids = malloc(threads * sizeof(pthread_t)); in test_signal_fpu() 86 threads_starting = threads; in test_signal_fpu() 87 for (i = 0; i < threads; i++) { in test_signal_fpu() 98 printf("\tSending signals to all threads %d times...", ITERATIONS); in test_signal_fpu() 100 for (j = 0; j < threads; j++) { in test_signal_fpu() 109 for (i = 0; i < threads; i++) { in test_signal_fpu()
|
/kernel/linux/linux-6.6/tools/testing/selftests/powerpc/math/ |
H A D | vmx_signal.c | 28 * worker threads 95 int i, j, rc, threads; in test_signal_vmx() local 102 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_signal_vmx() 103 tids = malloc(threads * sizeof(pthread_t)); in test_signal_vmx() 107 threads_starting = threads; in test_signal_vmx() 108 for (i = 0; i < threads; i++) { in test_signal_vmx() 114 printf("\tWaiting for %d workers to start... %d", threads, threads_starting); in test_signal_vmx() 122 printf("\tSending signals to all threads %d times...", ITERATIONS); in test_signal_vmx() 124 for (j = 0; j < threads; j++) { in test_signal_vmx() 133 for (i = 0; i < threads; in test_signal_vmx() [all...] |
H A D | fpu_preempt.c | 8 * no way to be sure preemption happened so this test just uses many threads 28 * worker threads 58 int i, rc, threads; in test_preempt_fpu() local 61 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_fpu() 62 tids = malloc((threads) * sizeof(pthread_t)); in test_preempt_fpu() 66 threads_starting = threads; in test_preempt_fpu() 67 for (i = 0; i < threads; i++) { in test_preempt_fpu() 89 for (i = 0; i < threads; i++) { in test_preempt_fpu()
|
H A D | vmx_preempt.c | 8 * no way to be sure preemption happened so this test just uses many threads 28 * worker threads 59 int i, rc, threads; in test_preempt_vmx() local 65 threads = sysconf(_SC_NPROCESSORS_ONLN) * THREAD_FACTOR; in test_preempt_vmx() 66 tids = malloc(threads * sizeof(pthread_t)); in test_preempt_vmx() 70 threads_starting = threads; in test_preempt_vmx() 71 for (i = 0; i < threads; i++) { in test_preempt_vmx() 93 for (i = 0; i < threads; i++) { in test_preempt_vmx()
|
/kernel/linux/linux-6.6/tools/perf/bench/ |
H A D | breakpoint.c | 33 OPT_UINTEGER('t', "threads", &thread_params.nthreads, "Specify amount of threads"), 89 pthread_t *threads; in breakpoint_thread() local 91 threads = calloc(thread_params.nthreads, sizeof(threads[0])); in breakpoint_thread() 92 if (!threads) in breakpoint_thread() 98 if (pthread_create(&threads[i], NULL, passive_thread, &done)) in breakpoint_thread() 104 pthread_join(threads[i], NULL); in breakpoint_thread() 106 free(threads); in breakpoint_thread() 111 // then starts nparallel threads whic 203 pthread_t *threads; bench_breakpoint_enable() local [all...] |
/kernel/linux/linux-5.10/tools/lib/perf/Documentation/examples/ |
H A D | counting.c | 23 struct perf_thread_map *threads; in main() local 40 threads = perf_thread_map__new_dummy(); in main() 41 if (!threads) { in main() 42 fprintf(stderr, "failed to create threads\n"); in main() 45 perf_thread_map__set_pid(threads, 0, 0); in main() 63 perf_evlist__set_maps(evlist, NULL, threads); in main() 81 perf_thread_map__put(threads); in main()
|
/kernel/linux/linux-6.6/tools/lib/perf/Documentation/examples/ |
H A D | counting.c | 23 struct perf_thread_map *threads; in main() local 40 threads = perf_thread_map__new_dummy(); in main() 41 if (!threads) { in main() 42 fprintf(stderr, "failed to create threads\n"); in main() 45 perf_thread_map__set_pid(threads, 0, 0); in main() 63 perf_evlist__set_maps(evlist, NULL, threads); in main() 81 perf_thread_map__put(threads); in main()
|