Skip to content

Commit 08541fa

Browse files
committed
Add DEBUG prints
1 parent 1b363c4 commit 08541fa

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.github/workflows/reusable_gpu.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ on:
1212
os:
1313
description: A list of OSes
1414
type: string
15-
default: "['Ubuntu', 'Windows']"
15+
default: "['Ubuntu']"
1616
build_type:
1717
description: A list of build types
1818
type: string
19-
default: "['Debug', 'Release']"
19+
default: "['Debug']"
2020
shared_lib:
2121
description: A list of options for building shared library
2222
type: string
@@ -110,7 +110,7 @@ jobs:
110110

111111
- name: Run benchmarks DEBUG
112112
working-directory: ${{env.BUILD_DIR}}
113-
run: UMF_LOG="level:debug;flush:debug;output:stderr;pid:yes" ./benchmark/umf-bench-ubench
113+
run: UMF_LOG="level:info;flush:info;output:stderr;pid:yes" ./benchmark/umf-bench-ubench
114114

115115
- name: Run benchmarks
116116
working-directory: ${{env.BUILD_DIR}}

benchmark/ubench.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,9 @@ UBENCH_EX(simple, proxy_pool_with_os_memory_provider) {
239239
proxy_pool);
240240
}
241241

242+
fprintf(stderr, ">>> DEBUG 1-A umfPoolDestroy(proxy_pool)\n");
242243
umfPoolDestroy(proxy_pool);
244+
fprintf(stderr, ">>> DEBUG 1-B umfPoolDestroy(proxy_pool)\n");
243245
umfMemoryProviderDestroy(os_memory_provider);
244246
free(array);
245247
}
@@ -322,7 +324,9 @@ UBENCH_EX(simple, disjoint_pool_with_os_memory_provider) {
322324
disjoint_pool);
323325
}
324326

327+
fprintf(stderr, ">>> DEBUG 2-A umfPoolDestroy(disjoint_pool)\n");
325328
umfPoolDestroy(disjoint_pool);
329+
fprintf(stderr, ">>> DEBUG 2-B umfPoolDestroy(disjoint_pool)\n");
326330
umfDisjointPoolParamsDestroy(disjoint_memory_pool_params);
327331
umfMemoryProviderDestroy(os_memory_provider);
328332
free(array);
@@ -369,7 +373,9 @@ UBENCH_EX(simple, jemalloc_pool_with_os_memory_provider) {
369373
jemalloc_pool);
370374
}
371375

376+
fprintf(stderr, ">>> DEBUG 3-A umfPoolDestroy(jemalloc_pool)\n");
372377
umfPoolDestroy(jemalloc_pool);
378+
fprintf(stderr, ">>> DEBUG 3-B umfPoolDestroy(jemalloc_pool)\n");
373379
umfMemoryProviderDestroy(os_memory_provider);
374380
free(array);
375381
}
@@ -415,9 +421,16 @@ UBENCH_EX(simple, scalable_pool_with_os_memory_provider) {
415421
scalable_pool);
416422
}
417423

424+
fprintf(stderr, ">>> DEBUG 4-A umfPoolDestroy(scalable_pool)\n");
418425
umfPoolDestroy(scalable_pool);
426+
fprintf(stderr, ">>> DEBUG 4-B umfPoolDestroy(scalable_pool)\n");
427+
fprintf(stderr,
428+
">>> DEBUG 4-C umfMemoryProviderDestroy(os_memory_provider)\n");
419429
umfMemoryProviderDestroy(os_memory_provider);
430+
fprintf(stderr,
431+
">>> DEBUG 4-D umfMemoryProviderDestroy(os_memory_provider)\n");
420432
free(array);
433+
fprintf(stderr, ">>> DEBUG 4-E free()\n");
421434
}
422435
#endif /* (defined UMF_POOL_SCALABLE_ENABLED) */
423436

@@ -610,7 +623,9 @@ UBENCH_EX(ipc, disjoint_pool_with_level_zero_provider) {
610623
umfPoolFree(pool, allocs[i].ptr);
611624
}
612625

626+
fprintf(stderr, ">>> DEBUG 5-A umfPoolDestroy(pool)\n");
613627
umfPoolDestroy(pool);
628+
fprintf(stderr, ">>> DEBUG 5-B umfPoolDestroy(pool)\n");
614629

615630
err_params_destroy:
616631
umfDisjointPoolParamsDestroy(disjoint_params);

src/provider/provider_os_memory.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,21 +668,28 @@ static void os_finalize(void *provider) {
668668
os_memory_provider_t *os_provider = provider;
669669

670670
if (os_provider->fd > 0) {
671+
fprintf(stderr, ">>> DEBUG 44-A %i\n", __LINE__);
671672
utils_mutex_destroy_not_free(&os_provider->lock_fd);
672673
}
673674

675+
fprintf(stderr, ">>> DEBUG 44-B %i\n", __LINE__);
674676
critnib_delete(os_provider->fd_offset_map);
675677

678+
fprintf(stderr, ">>> DEBUG 44-C %i\n", __LINE__);
676679
free_bitmaps(os_provider);
677680

678681
if (os_provider->partitions) {
682+
fprintf(stderr, ">>> DEBUG 44-D %i\n", __LINE__);
679683
umf_ba_global_free(os_provider->partitions);
680684
}
681685

682686
if (os_provider->nodeset_str_buf) {
687+
fprintf(stderr, ">>> DEBUG 44-E %i\n", __LINE__);
683688
umf_ba_global_free(os_provider->nodeset_str_buf);
684689
}
690+
fprintf(stderr, ">>> DEBUG 44-F %i\n", __LINE__);
685691
hwloc_topology_destroy(os_provider->topo);
692+
fprintf(stderr, ">>> DEBUG 44-G %i\n", __LINE__);
686693
umf_ba_global_free(os_provider);
687694
}
688695

0 commit comments

Comments
 (0)