Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_fread_fwrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

int main(int argc, char** argv) {
int EventSet = PAPI_NULL;
const char* names[NUM_EVENTS] = {"READ_CALLS", "READ_BYTES","READ_USEC","READ_ERR", "READ_EOF", "WRITE_CALLS","WRITE_BYTES","WRITE_USEC"};
const char* names[NUM_EVENTS] = {"appio:::READ_CALLS", "appio:::READ_BYTES", "appio:::READ_USEC", "appio:::READ_ERR", "appio:::READ_EOF", "appio:::WRITE_CALLS", "appio:::WRITE_BYTES", "appio:::WRITE_USEC"};
long long values[NUM_EVENTS];

char *infile = "/etc/group";
Expand Down
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_pthreads.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "papi_test.h"

#define NUM_EVENTS 6
const char* names[NUM_EVENTS] = {"READ_CALLS", "READ_BYTES","READ_USEC","WRITE_CALLS","WRITE_BYTES","WRITE_USEC"};
const char* names[NUM_EVENTS] = {"appio:::READ_CALLS", "appio:::READ_BYTES", "appio:::READ_USEC", "appio:::WRITE_CALLS", "appio:::WRITE_BYTES", "appio:::WRITE_USEC"};

#define NUM_INFILES 4
static const char* files[NUM_INFILES] = {"/etc/passwd", "/etc/group", "/etc/protocols", "/etc/nsswitch.conf"};
Expand Down
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

int main(int argc, char** argv) {
int EventSet = PAPI_NULL;
const char* names[NUM_EVENTS] = {"OPEN_CALLS", "OPEN_FDS", "READ_CALLS", "READ_BYTES", "READ_USEC", "READ_ERR", "READ_INTERRUPTED", "READ_WOULD_BLOCK", "WRITE_CALLS","WRITE_BYTES","WRITE_USEC","WRITE_WOULD_BLOCK"};
const char* names[NUM_EVENTS] = {"appio:::OPEN_CALLS", "appio:::OPEN_FDS", "appio:::READ_CALLS", "appio:::READ_BYTES", "appio:::READ_USEC", "appio:::READ_ERR", "appio:::READ_INTERRUPTED", "appio:::READ_WOULD_BLOCK", "appio:::WRITE_CALLS", "appio:::WRITE_BYTES", "appio:::WRITE_USEC", "appio:::WRITE_WOULD_BLOCK"};
long long values[NUM_EVENTS];

char *infile = "/etc/group";
Expand Down
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

main(int argc, char *argv[]) {
int EventSet = PAPI_NULL;
const char* names[NUM_EVENTS] = {"RECV_CALLS", "RECV_BYTES", "RECV_USEC", "RECV_ERR", "RECV_INTERRUPTED", "RECV_WOULD_BLOCK"};
const char* names[NUM_EVENTS] = {"appio:::RECV_CALLS", "appio:::RECV_BYTES", "appio:::RECV_USEC", "appio:::RECV_ERR", "appio:::RECV_INTERRUPTED", "appio:::RECV_WOULD_BLOCK"};
long long values[NUM_EVENTS];

/* Set TESTS_QUIET variable */
Expand Down
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_seek.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

int main(int argc, char** argv) {
int EventSet = PAPI_NULL;
const char* names[NUM_EVENTS] = {"READ_CALLS", "READ_BYTES", "READ_BLOCK_SIZE", "READ_USEC", "SEEK_CALLS", "SEEK_USEC", "SEEK_ABS_STRIDE_SIZE"};
const char* names[NUM_EVENTS] = {"appio:::READ_CALLS", "appio:::READ_BYTES", "appio:::READ_BLOCK_SIZE", "appio:::READ_USEC", "appio:::SEEK_CALLS", "appio:::SEEK_USEC", "appio:::SEEK_ABS_STRIDE_SIZE"};
long long values[NUM_EVENTS];

char *infile = "/etc/group";
Expand Down
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_select.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

int main(int argc, char** argv) {
int EventSet = PAPI_NULL;
const char* names[NUM_EVENTS] = {"SELECT_USEC"};
const char* names[NUM_EVENTS] = {"appio:::SELECT_USEC"};
long long values[NUM_EVENTS];

/* Set TESTS_QUIET variable */
Expand Down
2 changes: 1 addition & 1 deletion src/components/appio/tests/appio_test_socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

main(int argc, char *argv[]) {
int EventSet = PAPI_NULL;
const char* names[NUM_EVENTS] = {"READ_CALLS", "READ_BYTES", "READ_USEC", "READ_WOULD_BLOCK", "SOCK_READ_CALLS", "SOCK_READ_BYTES", "SOCK_READ_USEC", "SOCK_READ_WOULD_BLOCK", "WRITE_BYTES", "WRITE_CALLS", "WRITE_WOULD_BLOCK", "WRITE_USEC", "SOCK_WRITE_BYTES", "SOCK_WRITE_CALLS", "SOCK_WRITE_USEC"};
const char* names[NUM_EVENTS] = {"appio:::READ_CALLS", "appio:::READ_BYTES", "appio:::READ_USEC", "appio:::READ_WOULD_BLOCK", "appio:::SOCK_READ_CALLS", "appio:::SOCK_READ_BYTES", "appio:::SOCK_READ_USEC", "appio:::SOCK_READ_WOULD_BLOCK", "appio:::WRITE_BYTES", "appio:::WRITE_CALLS", "appio:::WRITE_WOULD_BLOCK", "appio:::WRITE_USEC", "appio:::SOCK_WRITE_BYTES", "appio:::SOCK_WRITE_CALLS", "appio:::SOCK_WRITE_USEC"};
long long values[NUM_EVENTS];

/* Set TESTS_QUIET variable */
Expand Down
22 changes: 11 additions & 11 deletions src/components/appio/tests/appio_values_by_name.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ int main (int argc, char **argv)
int i, retval;
int EventSet = PAPI_NULL;
char *event_name[NUM_EVENTS] = {
"READ_BYTES",
"READ_CALLS",
"READ_USEC",
"READ_EOF",
"READ_SHORT",
"READ_ERR",
"WRITE_BYTES",
"WRITE_CALLS",
"WRITE_USEC",
"WRITE_ERR",
"WRITE_SHORT"
"appio:::READ_BYTES",
"appio:::READ_CALLS",
"appio:::READ_USEC",
"appio:::READ_EOF",
"appio:::READ_SHORT",
"appio:::READ_ERR",
"appio:::WRITE_BYTES",
"appio:::WRITE_CALLS",
"appio:::WRITE_USEC",
"appio:::WRITE_ERR",
"appio:::WRITE_SHORT"
};
int event_code[NUM_EVENTS] = { 0, 0, 0, 0, 0, 0, 0, 0, 0};
long long event_value[NUM_EVENTS];
Expand Down
44 changes: 22 additions & 22 deletions src/components/example/tests/example_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,10 @@ int main (int argc, char **argv)
"PAPI_create_eventset() failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_ZERO", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_ZERO", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_ZERO not found\n",retval );
"example:::EXAMPLE_ZERO not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -162,7 +162,7 @@ int main (int argc, char **argv)
test_fail( __FILE__, __LINE__, "PAPI_stop failed\n", retval);
}

if (!quiet) printf("Testing EXAMPLE_ZERO: %lld\n",values[0]);
if (!quiet) printf("Testing example:::EXAMPLE_ZERO: %lld\n",values[0]);

if (values[0]!=0) {
test_fail( __FILE__, __LINE__, "Result should be 0!\n", 0);
Expand Down Expand Up @@ -191,10 +191,10 @@ int main (int argc, char **argv)
"PAPI_create_eventset() failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_CONSTANT", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_CONSTANT", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_CONSTANT not found\n",retval );
"example:::EXAMPLE_CONSTANT not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -214,7 +214,7 @@ int main (int argc, char **argv)
test_fail( __FILE__, __LINE__, "PAPI_stop failed\n", retval);
}

if (!quiet) printf("Testing EXAMPLE_CONSTANT: %lld\n",values[0]);
if (!quiet) printf("Testing example:::EXAMPLE_CONSTANT: %lld\n",values[0]);

if (values[0]!=42) {
test_fail( __FILE__, __LINE__, "Result should be 42!\n", 0);
Expand Down Expand Up @@ -244,10 +244,10 @@ int main (int argc, char **argv)
"PAPI_create_eventset() failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_AUTOINC", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_AUTOINC", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_AUTOINC not found\n",retval );
"example:::EXAMPLE_AUTOINC not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -256,7 +256,7 @@ int main (int argc, char **argv)
"PAPI_add_events failed\n", retval );
}

if (!quiet) printf("Testing EXAMPLE_AUTOINC: ");
if (!quiet) printf("Testing example:::EXAMPLE_AUTOINC: ");

for(i=0;i<10;i++) {

Expand Down Expand Up @@ -338,7 +338,7 @@ int main (int argc, char **argv)
}


if (!quiet) printf("Testing EXAMPLE_AUTOINC after PAPI_reset(): %lld\n",
if (!quiet) printf("Testing example:::EXAMPLE_AUTOINC after PAPI_reset(): %lld\n",
values[0]);

if (values[0]!=0) {
Expand Down Expand Up @@ -370,10 +370,10 @@ int main (int argc, char **argv)
"PAPI_create_eventset() failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_CONSTANT", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_CONSTANT", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_CONSTANT not found\n",retval );
"example:::EXAMPLE_CONSTANT not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -382,10 +382,10 @@ int main (int argc, char **argv)
"PAPI_add_events failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_GLOBAL_AUTOINC", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_GLOBAL_AUTOINC", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_GLOBAL_AUTOINC not found\n",retval );
"example:::EXAMPLE_GLOBAL_AUTOINC not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -394,10 +394,10 @@ int main (int argc, char **argv)
"PAPI_add_events failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_ZERO", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_ZERO", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_ZERO not found\n",retval );
"example:::EXAMPLE_ZERO not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand Down Expand Up @@ -457,10 +457,10 @@ int main (int argc, char **argv)
"PAPI_create_eventset() failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_CONSTANT", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_CONSTANT", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_CONSTANT not found\n",retval );
"example:::EXAMPLE_CONSTANT not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -469,10 +469,10 @@ int main (int argc, char **argv)
"PAPI_add_events failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_GLOBAL_AUTOINC", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_GLOBAL_AUTOINC", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_GLOBAL_AUTOINC not found\n",retval );
"example:::EXAMPLE_GLOBAL_AUTOINC not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand All @@ -481,10 +481,10 @@ int main (int argc, char **argv)
"PAPI_add_events failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_ZERO", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_ZERO", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_ZERO not found\n",retval );
"example:::EXAMPLE_ZERO not found\n",retval );
}

retval = PAPI_add_event( EventSet, code);
Expand Down
10 changes: 5 additions & 5 deletions src/components/example/tests/example_multiple_components.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ int main (int argc, char **argv)
"PAPI_create_eventset() failed\n", retval );
}

retval = PAPI_event_name_to_code("EXAMPLE_CONSTANT", &code);
retval = PAPI_event_name_to_code("example:::EXAMPLE_CONSTANT", &code);
if ( retval != PAPI_OK ) {
test_fail( __FILE__, __LINE__,
"EXAMPLE_ZERO not found\n",retval );
"example:::EXAMPLE_ZERO not found\n",retval );
}

retval = PAPI_add_event( EventSet1, code);
Expand Down Expand Up @@ -122,7 +122,7 @@ int main (int argc, char **argv)
"NO CPU component found\n", retval );
}

if (!quiet) printf("\nStarting EXAMPLE_CONSTANT and PAPI_TOT_CYC at the same time\n");
if (!quiet) printf("\nStarting example:::EXAMPLE_CONSTANT and PAPI_TOT_CYC at the same time\n");

/* Start CPU component event */
retval = PAPI_start( EventSet2 );
Expand Down Expand Up @@ -153,10 +153,10 @@ int main (int argc, char **argv)
test_fail( __FILE__, __LINE__, "PAPI_stop failed\n", retval);
}

if (!quiet) printf("Stopping EXAMPLE_CONSTANT and PAPI_TOT_CYC\n\n");
if (!quiet) printf("Stopping example:::EXAMPLE_CONSTANT and PAPI_TOT_CYC\n\n");


if (!quiet) printf("Results from EXAMPLE_CONSTANT: %lld\n",values1[0]);
if (!quiet) printf("Results from example:::EXAMPLE_CONSTANT: %lld\n",values1[0]);

if (values1[0]!=42) {
test_fail( __FILE__, __LINE__, "Result should be 42!\n", 0);
Expand Down
5 changes: 5 additions & 0 deletions src/components/perf_event/pe_libpfm4_events.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ static struct native_event_t *allocate_native_event(
return NULL;
}

if ((event_table->default_pmu.name) && (strcmp(pinfo.name, event_table->default_pmu.name)) != 0 && (strcmp(pinfo.name, pmu_name) != 0)) {
SUBDBG("EXIT: The provided event %s lacks the necessary pmu prefix %s.\n", name, pinfo.name);
return NULL;
}

ntv_evt->allocated_name=strdup(name);
ntv_evt->mask_string=strdup(masks);
ntv_evt->component=cidx;
Expand Down
Loading