Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extrae_define_event_type does not honor value range of extrae_type_t #111

Open
valentin-seitz opened this issue Jun 20, 2024 · 0 comments
Open

Comments

@valentin-seitz
Copy link

According to the extrae_types.h the extrae_type_t is defined as: typedef unsigned extrae_type_t;

Executing a code similar to:

#include <extrae.h>
#include <limits.h>
#include <stdio.h>
int main(){
        Extrae_init();
        extrae_value_t value = 1;
        extrae_type_t type=UINT_MAX-2; // type = 4294967293
        Extrae_event(type,value);
        
        extrae_value_t values[2]={0,value};
        char * descriptions[2] = {"zero","value"};
        unsigned nValues=2;
        Extrae_define_event_type (&type,"ownEventType",&nValues, values, descriptions);
}

I would expect the output in the corresponding .pcf file to contain:

EVENT_TYPE
0    4294967293    ownEventType
VALUES
0     zero
1     value

But using the current version of Extrae (v.4.1.7) I get the following output:

EVENT_TYPE
0    -3    ownEventType
VALUES
0      zero
1      value

Note, that this issue seems to happen before the merger, as the .sym file line corresponding to the generated .pcf entry is:

D -3 "ownEventType"
d 0 "zero"
d 1 "value"
@valentin-seitz valentin-seitz changed the title Extrae_define_event_type does not honor value range of extrae_type_t Extrae_define_event_type does not honor value range of extrae_type_t Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant