Skip to content

Commit 52a098d

Browse files
authored
Reference collector: add object spilling for multiple static ITT parts and more (#196)
* added g_ref_collector_global structure with collector-owned object lists * implemented spill_static_part_lists() to copy pre-existing objects from each static part during __itt_api_init() * added support for region APIs and different counter create APIs * added documentation comments for key functions and extension points * fixed some minor typos / issues * updated cargo-deny-action version * reset mutex_initialized before unlocking/destroying
1 parent 2f1c29e commit 52a098d

File tree

3 files changed

+187
-68
lines changed

3 files changed

+187
-68
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
runs-on: ubuntu-latest
5757
steps:
5858
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
59-
- uses: EmbarkStudios/cargo-deny-action@e2f4ede4a4e60ea15ff31bc0647485d80c66cfba # v2.0.4
59+
- uses: EmbarkStudios/cargo-deny-action@76cd80eb775d7bbbd2d80292136d74d39e1b4918 # v2.0.14
6060
with:
6161
manifest-path: rust/Cargo.toml
6262

src/ittnotify/ittnotify_config.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -604,14 +604,14 @@ typedef struct ___itt_global
604604
} \
605605
}
606606

607-
#define NEW_COUNTER_W(gptr,h,h_tail,name,domain,type) { \
607+
#define NEW_COUNTER_W(gptr,h,h_tail,name,domain,_type) { \
608608
h = (__itt_counter_info_t*)malloc(sizeof(__itt_counter_info_t)); \
609609
if (h != NULL) { \
610610
h->nameA = NULL; \
611611
h->nameW = name ? _wcsdup(name) : NULL; \
612612
h->domainA = NULL; \
613613
h->domainW = domain ? _wcsdup(domain) : NULL; \
614-
h->type = type; \
614+
h->type = _type; \
615615
h->index = 0; \
616616
h->next = NULL; \
617617
if (h_tail == NULL) \
@@ -621,7 +621,7 @@ typedef struct ___itt_global
621621
} \
622622
}
623623

624-
#define NEW_COUNTER_A(gptr,h,h_tail,name,domain,type) { \
624+
#define NEW_COUNTER_A(gptr,h,h_tail,name,domain,_type) { \
625625
h = (__itt_counter_info_t*)malloc(sizeof(__itt_counter_info_t)); \
626626
if (h != NULL) { \
627627
char *name_copy = NULL; \
@@ -632,7 +632,7 @@ typedef struct ___itt_global
632632
__itt_fstrdup(domain, domain_copy); \
633633
h->domainA = domain_copy; \
634634
h->domainW = NULL; \
635-
h->type = type; \
635+
h->type = _type; \
636636
h->index = 0; \
637637
h->next = NULL; \
638638
if (h_tail == NULL) \
@@ -642,14 +642,14 @@ typedef struct ___itt_global
642642
} \
643643
}
644644

645-
#define NEW_HISTOGRAM_W(gptr,h,h_tail,domain,name,x_type,y_type) { \
645+
#define NEW_HISTOGRAM_W(gptr,h,h_tail,_domain,name,_x_type,_y_type) { \
646646
h = (__itt_histogram*)malloc(sizeof(__itt_histogram)); \
647647
if (h != NULL) { \
648-
h->domain = domain; \
648+
h->domain = _domain; \
649649
h->nameA = NULL; \
650650
h->nameW = name ? _wcsdup(name) : NULL; \
651-
h->x_type = x_type; \
652-
h->y_type = y_type; \
651+
h->x_type = _x_type; \
652+
h->y_type = _y_type; \
653653
h->extra1 = 0; \
654654
h->extra2 = NULL; \
655655
h->next = NULL; \
@@ -660,16 +660,16 @@ typedef struct ___itt_global
660660
} \
661661
}
662662

663-
#define NEW_HISTOGRAM_A(gptr,h,h_tail,domain,name,x_type,y_type) { \
663+
#define NEW_HISTOGRAM_A(gptr,h,h_tail,_domain,name,_x_type,_y_type) { \
664664
h = (__itt_histogram*)malloc(sizeof(__itt_histogram)); \
665665
if (h != NULL) { \
666-
h->domain = domain; \
666+
h->domain = _domain; \
667667
char *name_copy = NULL; \
668668
__itt_fstrdup(name, name_copy); \
669669
h->nameA = name_copy; \
670670
h->nameW = NULL; \
671-
h->x_type = x_type; \
672-
h->y_type = y_type; \
671+
h->x_type = _x_type; \
672+
h->y_type = _y_type; \
673673
h->extra1 = 0; \
674674
h->extra2 = NULL; \
675675
h->next = NULL; \

0 commit comments

Comments
 (0)