Commit 160edff
authored
Initialization fixes (ROCm#154)
- Remove tooling initialization from rocprofiler_configure:
when rocprofiler configure is called from __hip_module_ctor
(which in turn is called as a global constructor when loading shared
libraries or before main in a hip program), initializing tooling
in it can cause problems because it is too early to do some of the tasks
that it involves (e.g. opening shared libraries, creating threads).
Instead, we rely on rocprofsys_main to initialize tooling later.
- Skip rocprofiler_configure if ROCPROFSYS_PRELOAD is not set since
preload is required for tooling (such as perfetto, which is used by
the rocprofiler callbacks) to be initialized.
- Revert RCCL initialization changes: These are no longer needed since rocprofsys_init_tooling_hidden will not
be called from rocprofiler_configure
- Force rocprofiler_configure in rocprofsys_init_tooling_hidden if it hasn't been
called through __hip_module_ctor global constructor
[ROCm/rocprofiler-systems commit: 0e535da]1 parent 17ed9dd commit 160edff
File tree
4 files changed
+30
-41
lines changed- projects/rocprofiler-systems/source/lib/rocprof-sys
- library
4 files changed
+30
-41
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
Lines changed: 21 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | | - | |
430 | | - | |
431 | | - | |
432 | | - | |
433 | 407 | | |
434 | 408 | | |
435 | 409 | | |
436 | | - | |
| 410 | + | |
437 | 411 | | |
438 | 412 | | |
439 | 413 | | |
440 | 414 | | |
441 | 415 | | |
442 | | - | |
| 416 | + | |
443 | 417 | | |
444 | 418 | | |
445 | 419 | | |
| |||
456 | 430 | | |
457 | 431 | | |
458 | 432 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
| 433 | + | |
464 | 434 | | |
465 | 435 | | |
466 | 436 | | |
| |||
481 | 451 | | |
482 | 452 | | |
483 | 453 | | |
484 | | - | |
| 454 | + | |
485 | 455 | | |
486 | 456 | | |
487 | 457 | | |
| |||
579 | 549 | | |
580 | 550 | | |
581 | 551 | | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
582 | 569 | | |
583 | 570 | | |
584 | 571 | | |
| |||
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1301 | 1301 | | |
1302 | 1302 | | |
1303 | 1303 | | |
1304 | | - | |
1305 | | - | |
| 1304 | + | |
| 1305 | + | |
| 1306 | + | |
| 1307 | + | |
| 1308 | + | |
| 1309 | + | |
1306 | 1310 | | |
1307 | | - | |
1308 | | - | |
1309 | | - | |
| 1311 | + | |
1310 | 1312 | | |
1311 | 1313 | | |
1312 | 1314 | | |
| |||
0 commit comments