Conversation
6e3c376 to
b673987
Compare
* src/customlabels.c * src/customlabels.h
| #define cur_storage (custom_labels_current_set->storage) | ||
| #define cur_capacity (custom_labels_current_set->capacity) | ||
|
|
||
| __attribute__((retain)) |
There was a problem hiding this comment.
Why do we need retain ? I have not used this in C. Is it valid ?
There was a problem hiding this comment.
I mainly used it because they used it for the other exported variables. I am looking into it in more details now.
There was a problem hiding this comment.
This seems to be used to prevent section
garbage collection by the linker, as explained here. It means that the variable's symbol will remain visible even if it is not referenced in the code. For process_storage, this is not very relevant since we do not care for it if it is not used. It makes more sense for the other exported variables.
| __attribute__((retain)) |
| * Set the process-level data. | ||
| * | ||
| * We want to keep this somewhat generic. For simplicity, for the time being, | ||
| * the tracer hands the library the bytes directly. |
There was a problem hiding this comment.
Minor: the sentence is strange. Proposal:
The tracer provides the bytes to the library. The library stores them until the proc_storage_free function is called.
There was a problem hiding this comment.
| * the tracer hands the library the bytes directly. | |
| * the tracer provides the bytes to the library. The library stores them until the proc_storage_free function is called. |
That sounds good.
| #define cur_capacity (custom_labels_current_set->capacity) | ||
|
|
||
| __attribute__((retain)) | ||
| unsigned char* process_storage = NULL; |
There was a problem hiding this comment.
Should we store the size in association ?
* Makefile
b673987 to
84bc0b1
Compare
* BUILD.bazel * MODULE.bazel
ae397dc to
1bc7423
Compare
aa2e823 to
5c5eaf2
Compare
No description provided.