/openbmc/linux/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, 0, tid); in thread_map__new_by_tid() [all …]
|
/openbmc/linux/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 [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()
|
H A D | mmap-basic.c | 36 struct perf_thread_map *threads; in test__basic_mmap() local 49 threads = thread_map__new(-1, getpid(), UINT_MAX); in test__basic_mmap() 50 if (threads == NULL) { in test__basic_mmap() 77 perf_evlist__set_maps(&evlist->core, cpus, threads); in test__basic_mmap() 98 if (evsel__open(evsels[i], cpus, threads) < 0) { in test__basic_mmap() 168 perf_thread_map__put(threads); in test__basic_mmap() 175 struct perf_thread_map *threads; in test_stat_user_read() local 188 threads = perf_thread_map__new_dummy(); in test_stat_user_read() 189 TEST_ASSERT_VAL("failed to create threads", threads); in test_stat_user_read() 191 perf_thread_map__set_pid(threads, 0, 0); in test_stat_user_read() [all …]
|
/openbmc/linux/tools/lib/perf/tests/ |
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", threads); in test_stat_thread_enable() 100 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread_enable() [all …]
|
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; in test_threadmap() 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", threads); in test_stat_thread_enable() 168 perf_thread_map__set_pid(threads, 0, 0); in test_stat_thread_enable() [all …]
|
/openbmc/linux/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->nr; i++) in perf_thread_map__delete() [all …]
|
/openbmc/qemu/hw/core/ |
H A D | machine-smp.c | 59 g_string_append_printf(s, " * threads (%u)", ms->smp.threads); in cpu_hierarchy_to_string() 97 unsigned threads = config->has_threads ? config->threads : 0; in machine_parse_smp_config() local 113 (config->has_threads && config->threads == 0) || in machine_parse_smp_config() 168 threads = threads > 0 ? threads : 1; in machine_parse_smp_config() 176 threads = threads > 0 ? threads : 1; in machine_parse_smp_config() 179 modules * cores * threads); in machine_parse_smp_config() 181 threads = threads > 0 ? threads : 1; in machine_parse_smp_config() 184 clusters * modules * threads); in machine_parse_smp_config() 190 threads = threads > 0 ? threads : 1; in machine_parse_smp_config() 193 clusters * modules * threads); in machine_parse_smp_config() [all …]
|
/openbmc/openbmc/meta-openembedded/meta-oe/recipes-benchmark/tiobench/tiobench-0.3.3/ |
H A D | avoid-glibc-clashes.patch | 38 pthread_attr_setscope(&(d->threads[i].thread_attr), 41 - d->threads[i].buffer = aligned_alloc( d->threads[i].blockSize ); 42 + d->threads[i].buffer = _aligned_alloc( d->threads[i].blockSize ); 43 if( d->threads[i].buffer == NULL ) 49 unlink(d->threads[i].fileName); 50 - aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); 51 + _aligned_free( d->threads[i].buffer, d->threads[i].blockSize ); 52 d->threads[i].buffer = 0; 54 pthread_attr_destroy( &(d->threads[i].thread_attr) );
|
/openbmc/qemu/tests/migration/guestperf/ |
H A D | plot.py | 151 threads = {} 153 if record._tid in threads: 155 threads[record._tid] = { 172 threads[record._tid]["xaxis"].append(record._timestamp - starttime) 173 threads[record._tid]["yaxis"].append(record._value) 174 threads[record._tid]["labels"].append(self._get_progress_label(progress)) 179 for tid in threads.keys(): 181 go.Scatter(x=threads[tid]["xaxis"], 182 y=threads[tid]["yaxis"], 191 text=threads[tid]["labels"])) [all …]
|
/openbmc/qemu/tests/unit/ |
H A D | test-aio-multithread.c | 24 static IOThread *threads[NUM_CONTEXTS]; variable 71 threads[i] = iothread_new(); in create_aio_contexts() 72 ctx[i] = iothread_get_aio_context(threads[i]); in create_aio_contexts() 91 iothread_join(threads[i]); in join_aio_contexts() 226 static void test_multi_co_mutex(int threads, int seconds) in test_multi_co_mutex() argument 236 assert(threads <= NUM_CONTEXTS); in test_multi_co_mutex() 237 running = threads; in test_multi_co_mutex() 238 for (i = 0; i < threads; i++) { in test_multi_co_mutex() 345 static void test_multi_fair_mutex(int threads, int seconds) in test_multi_fair_mutex() argument 355 assert(threads <= NUM_CONTEXTS); in test_multi_fair_mutex() [all …]
|
/openbmc/qemu/tests/qtest/ |
H A D | cpu-plug-test.c | 22 unsigned threads; member 40 td->sockets, td->cores, td->threads, td->maxcpus); in test_plug_with_device_add() 96 data->threads = 2; in add_pc_test_case() 97 data->maxcpus = data->sockets * data->cores * data->threads; in add_pc_test_case() 101 data->threads, data->maxcpus); in add_pc_test_case() 122 data->threads = 1; in add_pseries_test_case() 123 data->maxcpus = data->sockets * data->cores * data->threads; in add_pseries_test_case() 127 data->threads, data->maxcpus); in add_pseries_test_case() 148 data->threads = 1; in add_s390x_test_case() 149 data->maxcpus = data->sockets * data->cores * data->threads; in add_s390x_test_case() [all …]
|
/openbmc/linux/tools/perf/bench/ |
H A D | breakpoint.c | 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() 203 pthread_t *threads; in bench_breakpoint_enable() local 220 threads = calloc(nthreads, sizeof(threads[0])); in bench_breakpoint_enable() 221 if (!threads) in bench_breakpoint_enable() 225 if (pthread_create(&threads[i], NULL, in bench_breakpoint_enable() [all …]
|
H A D | synthesize.c | 62 struct perf_thread_map *threads, in do_run_single_threaded() argument 81 target, threads, in do_run_single_threaded() 116 struct perf_thread_map *threads; in run_single_threaded() local 125 threads = thread_map__new_by_pid(getpid()); in run_single_threaded() 126 if (!threads) { in run_single_threaded() 136 err = do_run_single_threaded(session, threads, &target, false); in run_single_threaded() 140 err = do_run_single_threaded(session, threads, &target, true); in run_single_threaded() 143 if (threads) in run_single_threaded() 144 perf_thread_map__put(threads); in run_single_threaded()
|
/openbmc/linux/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() 109 map.threads = threads; in main() 122 threads, seconds, node, dir[directions], granule); in main()
|
/openbmc/linux/tools/testing/selftests/powerpc/math/ |
H A D | fpu_preempt.c | 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 | 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() 100 for (j = 0; j < threads; j++) { in test_signal_fpu() 109 for (i = 0; i < threads; i++) { in test_signal_fpu()
|
H A D | vmx_signal.c | 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() 124 for (j = 0; j < threads; j++) { in test_signal_vmx() 133 for (i = 0; i < threads; i++) { in test_signal_vmx()
|
H A D | vmx_preempt.c | 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()
|
/openbmc/linux/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() 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()
|
/openbmc/linux/drivers/gpu/drm/i915/gt/ |
H A D | selftest_slpc.c | 483 struct slpc_thread *threads; in live_slpc_tile_interaction() local 486 threads = kcalloc(I915_MAX_GT, sizeof(*threads), GFP_KERNEL); in live_slpc_tile_interaction() 487 if (!threads) in live_slpc_tile_interaction() 491 threads[i].worker = kthread_create_worker(0, "igt/slpc_parallel:%d", gt->info.id); in live_slpc_tile_interaction() 493 if (IS_ERR(threads[i].worker)) { in live_slpc_tile_interaction() 494 ret = PTR_ERR(threads[i].worker); in live_slpc_tile_interaction() 498 threads[i].gt = gt; in live_slpc_tile_interaction() 499 kthread_init_work(&threads[i].work, slpc_spinner_thread); in live_slpc_tile_interaction() 500 kthread_queue_work(threads[i].worker, &threads[i].work); in live_slpc_tile_interaction() 506 if (IS_ERR_OR_NULL(threads[i].worker)) in live_slpc_tile_interaction() [all …]
|
/openbmc/linux/tools/testing/selftests/mm/ |
H A D | migration.c | 25 pthread_t *threads; in FIXTURE() local 51 self->threads = malloc(self->nthreads * sizeof(*self->threads)); in FIXTURE_SETUP() 52 ASSERT_NE(self->threads, NULL); in FIXTURE_SETUP() 59 free(self->threads); in FIXTURE_TEARDOWN() 132 if (pthread_create(&self->threads[i], NULL, access_mem, ptr)) 137 ASSERT_EQ(pthread_cancel(self->threads[i]), 0); 194 if (pthread_create(&self->threads[i], NULL, access_mem, ptr)) 199 ASSERT_EQ(pthread_cancel(self->threads[i]), 0);
|
/openbmc/linux/tools/testing/selftests/powerpc/tm/ |
H A D | tm-vmx-unavail.c | 90 int threads; in tm_vmx_unavail_test() local 98 threads = sysconf(_SC_NPROCESSORS_ONLN) * 4; in tm_vmx_unavail_test() 99 thread = malloc(sizeof(pthread_t)*threads); in tm_vmx_unavail_test() 103 for (uint64_t i = 0; i < threads; i++) in tm_vmx_unavail_test() 106 for (uint64_t i = 0; i < threads; i++) in tm_vmx_unavail_test()
|
/openbmc/linux/Documentation/driver-api/dmaengine/ |
H A D | dmatest.rst | 16 test multiple channels at the same time, and it can start multiple threads 73 (shared) parameters used for all threads will use the new values. 74 After the channels are specified, each thread is set as pending. All threads 82 Once started a message like " dmatest: Added 1 threads using dma0chan0" is 171 dmatest: Added 1 threads using dma0chan2 179 dmatest: Added 1 threads using dma0chan1 181 dmatest: Added 1 threads using dma0chan2 191 dmatest: Added 1 threads using dma0chan0 192 dmatest: Added 1 threads using dma0chan3 193 dmatest: Added 1 threads using dma0chan4 [all …]
|