From d259797c6c1bd36dd2d8caf166f623ab668a494d Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 10 2020 00:33:33 +0000 Subject: Prepare for a new update Reverting patches so we can apply the latest update and changes can be seen in the spec file and sources. --- diff --git a/src/components/Makefile_comp_tests.target.in b/src/components/Makefile_comp_tests.target.in index a4412be..9a369ad 100644 --- a/src/components/Makefile_comp_tests.target.in +++ b/src/components/Makefile_comp_tests.target.in @@ -9,7 +9,7 @@ INCLUDE = -I. -I@includedir@ -I$(datadir) -I$(testlibdir) -I$(validationlibdir) LIBDIR = @libdir@ PAPILIB = $(datadir)/@LIBRARY@ TESTLIB = $(testlibdir)/libtestlib.a -LDFLAGS = @LDFLAGS@ @LDL@ +LDFLAGS = @LDL@ CC = @CC@ F77 = @F77@ CC_R = @CC_R@ diff --git a/src/components/perf_event/perf_event.c b/src/components/perf_event/perf_event.c index 9eb7676..9e9c852 100644 --- a/src/components/perf_event/perf_event.c +++ b/src/components/perf_event/perf_event.c @@ -1098,23 +1098,14 @@ _pe_rdpmc_read( hwd_context_t *ctx, hwd_control_state_t *ctl, count = mmap_read_self(pe_ctl->events[i].mmap_buf, &enabled,&running); - /* TODO: more error checking? */ + /* TODO: error checking? */ /* Handle multiplexing case */ - if (enabled == running) { - /* no adjustment needed */ - } - else if (enabled && running) { + if (enabled!=running) { adjusted = (enabled * 128LL) / running; adjusted = adjusted * count; adjusted = adjusted / 128LL; count = adjusted; - } else { - /* This should not happen, but we have had it reported */ - SUBDBG("perf_event kernel bug(?) count, enabled, " - "running: %lld, %lld, %lld\n", - papi_pe_buffer[0],enabled,running); - } pe_ctl->counts[i] = count; diff --git a/src/components/perf_event_uncore/tests/Makefile b/src/components/perf_event_uncore/tests/Makefile index d70debe..3ee8fc2 100644 --- a/src/components/perf_event_uncore/tests/Makefile +++ b/src/components/perf_event_uncore/tests/Makefile @@ -17,19 +17,19 @@ perf_event_uncore_lib.o: perf_event_uncore_lib.c perf_event_uncore_lib.h perf_event_amd_northbridge: perf_event_amd_northbridge.o $(DOLOOPS) $(UTILOBJS) $(PAPILIB) $(DOLOOPS) - $(CC) $(CFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) + $(CC) $(LFLAGS) -o perf_event_amd_northbridge perf_event_amd_northbridge.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) perf_event_uncore: perf_event_uncore.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o - $(CC) $(CFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) + $(CC) $(LFLAGS) -o perf_event_uncore perf_event_uncore.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) perf_event_uncore_attach: perf_event_uncore_attach.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) perf_event_uncore_lib.o - $(CC) $(CFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) + $(CC) $(LFLAGS) -o perf_event_uncore_attach perf_event_uncore_attach.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) perf_event_uncore_multiple: perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) - $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) + $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_multiple perf_event_uncore_multiple.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) perf_event_uncore_cbox: perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) - $(CC) $(CFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) + $(CC) $(LFLAGS) $(INCLUDE) -o perf_event_uncore_cbox perf_event_uncore_cbox.o perf_event_uncore_lib.o $(UTILOBJS) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) diff --git a/src/ctests/Makefile.recipies b/src/ctests/Makefile.recipies index d7cfbf6..63c107c 100644 --- a/src/ctests/Makefile.recipies +++ b/src/ctests/Makefile.recipies @@ -157,12 +157,6 @@ locks_pthreads: locks_pthreads.c $(TESTLIB) $(PAPILIB) krentel_pthreads: krentel_pthreads.c $(TESTLIB) $(PAPILIB) $(CC_R) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) krentel_pthreads.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o krentel_pthreads -lpthread -# krentel_pthreads_race is not included with the standard tests; -# it is a modification of krentel_pthreads intended to be run with -# "valgrind --tool=helgrind" to test for race conditions. -krentel_pthreads_race: krentel_pthreads_race.c $(TESTLIB) $(PAPILIB) - $(CC_R) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) krentel_pthreads_race.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o krentel_pthreads_race -lpthread - overflow_pthreads: overflow_pthreads.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(CC_R) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) overflow_pthreads.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) -o overflow_pthreads -lpthread @@ -356,7 +350,7 @@ code2name: code2name.c $(TESTLIB) $(PAPILIB) $(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) code2name.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o code2name attach_target: attach_target.c $(DOLOOPS) - -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB) $(LDFLAGS) + -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) attach_target.c -o attach_target $(DOLOOPS) $(TESTLIB) zero_attach: zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) zero_attach.c $(TESTLIB) $(DOLOOPS) $(PAPILIB) $(LDFLAGS) -o zero_attach @@ -427,9 +421,6 @@ forkexec4: forkexec4.c $(TESTLIB) $(PAPILIB) prof_utils.o: prof_utils.c $(testlibdir)/papi_test.h prof_utils.h $(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) -c prof_utils.c -filter_helgrind: filter_helgrind.c $(TESTLIB) $(PAPILIB) - -$(CC) $(INCLUDE) $(CFLAGS) $(TOPTFLAGS) filter_helgrind.c $(TESTLIB) $(PAPILIB) $(LDFLAGS) -o filter_helgrind - .PHONY : all default ctests ctest clean clean: diff --git a/src/ctests/Makefile.target.in b/src/ctests/Makefile.target.in index fcc3373..bb51c35 100644 --- a/src/ctests/Makefile.target.in +++ b/src/ctests/Makefile.target.in @@ -12,7 +12,7 @@ LIBRARY=@LIBRARY@ SHLIB=@SHLIB@ PAPILIB = ../@LINKLIB@ TESTLIB = $(testlibdir)/libtestlib.a -LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@ +LDFLAGS = @LDL@ @STATIC@ CC = @CC@ MPICC = @MPICC@ F77 = @F77@ diff --git a/src/ctests/filter_helgrind.c b/src/ctests/filter_helgrind.c deleted file mode 100644 index d918a78..0000000 --- a/src/ctests/filter_helgrind.c +++ /dev/null @@ -1,170 +0,0 @@ -/* - * This code is a simple filter for the helgrind_out.txt file - * produced by: - * "valgrind --tool=helgrind --log-file=helgrind_out.txt someProgram" - * - * This is useful because the tool does not recognize PAPI locks, - * thus reports as possible race conditions reads/writes by - * different threads that are actually fine (surrounded by locks). - * - * This was written particularly for krentel_pthreads_race.c - * when processed by the above valgrind. We produce a line per - * condition, in the form: - * OP@file:line OP@file:line - * where OP is R or W. The first file:line code occurred - * after the second file:line code, and on a different thread. - * - * We print the results to stdout. It is useful to filter this - * through the standard utility 'uniq', each occurrence only - * needs to be investigated once. Just insure there are - * MATCHING locks around each operation within the code. - * - * An example run (using uniq): The options -uc will print - * only unique lines, preceeded by a count of how many times - * it occurs. - * - * ./filter_helgrind | uniq -uc - * - * An example output line (piped through uniq as above): - * 1 R@threads.c:190 W@threads.c:206 - * An investigation shows threads.c:190 is protected by - * _papi_hwi_lock(THREADS_LOCK); and threads.c:206 is - * protected by the same lock. Thus no data race can - * occur for this instance. - * - * Compilation within the papi/src/ctests directory: - * make filter_helgrind - * - */ - -#include -#include -#include - -int main(int argc, char** args) { - (void) argc; - (void) args; - - char myLine[16384]; - int state, size; - char type1, type2; - char fname1[256], fname2[256]; - char *paren1, *paren2; - - FILE *HELOUT = fopen("helgrind_out.txt", "r"); // Read the file. - if (HELOUT == NULL) { - fprintf(stderr, "Could not open helgrind_out.txt.\n"); - exit(-1); - } - - char PDRR[]="Possible data race during read"; - char PDRW[]="Possible data race during write"; - char TCWW[]="This conflicts with a previous write"; - char TCWR[]="This conflicts with a previous read"; - char atSTR[]=" at "; - - // State machine: - // State 0: We are looking for a line with PDRR or PDRW. - // We don't exit until we find it, or run out of lines. - // if we find it, we remember which and go to state 1. - // State 1: Looking for " at " in column 11. - // When found, we extract the string betweeen '(' and ')' - // which is program name:line. go to state 2. - // State 2: We are searching for TCWW, TCWR, PDRW, PDRR. - // If we find the first two: - // Remember which, and go to state 3. - // If we find either of the second two, go back to State 1. - // State 3: Looking for " at " in column 11. - // When found, extract the string betweeen '(' and ')', - // which is program name:line. - // OUTPUT LINE for an investigation. - // Go to State 0. - - state = 0; // looking for PDRR, PDRW. - while (fgets(myLine, 16384, HELOUT) != NULL) { - if (strlen(myLine) < 20) continue; - switch (state) { - case 0: // Looking for PDRR or PRDW. - if (strstr(myLine, PDRR) != NULL) { - type1='R'; - state=1; - continue; - } - - if (strstr(myLine, PDRW) != NULL) { - type1='W'; - state=1; - continue; - } - - continue; - break; - - case 1: // Looking for atSTR in column 11. - if (strncmp(myLine+10, atSTR, 6) != 0) continue; - paren1=strchr(myLine, '('); - paren2=strchr(myLine, ')'); - if (paren1 == NULL || paren2 == NULL || - paren1 > paren2) { - state=0; // Abort, found something I don't understand. - continue; - } - - size = paren2-paren1-1; // compute length of name. - strncpy(fname1, paren1+1, size); // Copy the name. - fname1[size]=0; // install z-terminator. - state=2; - continue; - break; - - case 2: // Looking for TCWW, TCWR, PDRR, PDRW. - if (strstr(myLine, TCWR) != NULL) { - type2='R'; - state=3; - continue; - } - - if (strstr(myLine, TCWW) != NULL) { - type2='W'; - state=3; - continue; - } - - if (strstr(myLine, PDRR) != NULL) { - type1='R'; - state=1; - continue; - } - - if (strstr(myLine, PDRW) != NULL) { - type1='W'; - state=1; - continue; - } - - continue; - break; - - case 3: // Looking for atSTR in column 11. - if (strncmp(myLine+10, atSTR, 6) != 0) continue; - paren1=strchr(myLine, '('); - paren2=strchr(myLine, ')'); - if (paren1 == NULL || paren2 == NULL || - paren1 > paren2) { - state=0; // Abort, found something I don't understand. - continue; - } - - size = paren2-paren1-1; // compute length of name. - strncpy(fname2, paren1+1, size); // Copy the name. - fname2[size]=0; // install z-terminator. - fprintf(stdout, "%c@%-32s %c@%-32s\n", type1, fname1, type2, fname2); - state=0; - continue; - break; - } // end switch. - } // end while. - - fclose(HELOUT); - exit(0); -} diff --git a/src/ctests/krentel_pthreads_race.c b/src/ctests/krentel_pthreads_race.c deleted file mode 100644 index 0ebfb50..0000000 --- a/src/ctests/krentel_pthreads_race.c +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Test PAPI with multiple threads. - * This code is a modification of krentel_pthreads.c by William Cohen - * , on Sep 10 2019, to exercise and test for the race - * condition in papi_internal.c involving the formerly static variables - * papi_event_code and papi_event_code_changed. This code should be run with - * "valgrind --tool=helgrind" to show any data races. If run with: - * "valgrind --tool=helgrind --log-file=helgrind_out.txt" - * The output will be captured in helgrind_out.txt and can then be processed - * with the program filter_helgrind.c; see commentary at the top of that file. - */ - -#define MAX_THREADS 256 - -#include -#include -#include -#include - -#include "papi.h" -#include "papi_test.h" - -#define EVENT PAPI_TOT_CYC - -static int program_time = 5; -static int threshold = 20000000; -static int num_threads = 3; - -static long count[MAX_THREADS]; -static long iter[MAX_THREADS]; -static struct timeval last[MAX_THREADS]; - -static pthread_key_t key; - -static struct timeval start; - -static void -my_handler( int EventSet, void *pc, long long ovec, void *context ) -{ - ( void ) EventSet; - ( void ) pc; - ( void ) ovec; - ( void ) context; - - long num = ( long ) pthread_getspecific( key ); - - if ( num < 0 || num > num_threads ) - test_fail( __FILE__, __LINE__, "getspecific failed", 1 ); - count[num]++; -} - -static void -print_rate( long num ) -{ - struct timeval now; - long st_secs; - double last_secs; - - gettimeofday( &now, NULL ); - st_secs = now.tv_sec - start.tv_sec; - last_secs = ( double ) ( now.tv_sec - last[num].tv_sec ) - + ( ( double ) ( now.tv_usec - last[num].tv_usec ) ) / 1000000.0; - if ( last_secs <= 0.001 ) - last_secs = 0.001; - - if (!TESTS_QUIET) { - printf( "[%ld] time = %ld, count = %ld, iter = %ld, " - "rate = %.1f/Kiter\n", - num, st_secs, count[num], iter[num], - ( 1000.0 * ( double ) count[num] ) / ( double ) iter[num] ); - } - - count[num] = 0; - iter[num] = 0; - last[num] = now; -} - -static void -do_cycles( long num, int len ) -{ - struct timeval start, now; - double x, sum; - - gettimeofday( &start, NULL ); - - for ( ;; ) { - sum = 1.0; - for ( x = 1.0; x < 250000.0; x += 1.0 ) - sum += x; - if ( sum < 0.0 ) - printf( "==>> SUM IS NEGATIVE !! <<==\n" ); - - iter[num]++; - - gettimeofday( &now, NULL ); - if ( now.tv_sec >= start.tv_sec + len ) - break; - } -} - -static void * -my_thread( void *v ) -{ - long num = ( long ) v; - int n; - int EventSet = PAPI_NULL; - int event_code; - long long value; - - int retval; - - retval = PAPI_register_thread( ); - if ( retval != PAPI_OK ) { - test_fail( __FILE__, __LINE__, "PAPI_register_thread", retval ); - } - pthread_setspecific( key, v ); - - count[num] = 0; - iter[num] = 0; - last[num] = start; - - retval = PAPI_create_eventset( &EventSet ); - if ( retval != PAPI_OK ) { - test_fail( __FILE__, __LINE__, "PAPI_create_eventset failed", retval ); - } - - retval = PAPI_event_name_to_code("PAPI_TOT_CYC", &event_code); - if (retval != PAPI_OK ) { - if (!TESTS_QUIET) printf("Trouble creating event name\n"); - test_fail( __FILE__, __LINE__, "PAPI_event_name_to_code failed", retval ); - } - - retval = PAPI_add_event( EventSet, EVENT ); - if (retval != PAPI_OK ) { - if (!TESTS_QUIET) printf("Trouble adding event\n"); - test_fail( __FILE__, __LINE__, "PAPI_add_event failed", retval ); - } - - if ( PAPI_overflow( EventSet, EVENT, threshold, 0, my_handler ) != PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_overflow failed", 1 ); - - if ( PAPI_start( EventSet ) != PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_start failed", 1 ); - - if (!TESTS_QUIET) printf( "launched timer in thread %ld\n", num ); - - for ( n = 1; n <= program_time; n++ ) { - do_cycles( num, 1 ); - print_rate( num ); - } - - PAPI_stop( EventSet, &value ); - - retval = PAPI_overflow( EventSet, EVENT, 0, 0, my_handler); - if ( retval != PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_overflow failed to reset the overflow handler", retval ); - - if ( PAPI_remove_event( EventSet, EVENT ) != PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_remove_event", 1 ); - - if ( PAPI_destroy_eventset( &EventSet ) != PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_destroy_eventset", 1 ); - - if ( PAPI_unregister_thread( ) != PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_unregister_thread", 1 ); - - return ( NULL ); -} - -int -main( int argc, char **argv ) -{ - pthread_t *td = NULL; - long n; - int quiet,retval; - - /* Set TESTS_QUIET variable */ - quiet=tests_quiet( argc, argv ); - - if ( argc < 2 || sscanf( argv[1], "%d", &program_time ) < 1 ) - program_time = 6; - if ( argc < 3 || sscanf( argv[2], "%d", &threshold ) < 1 ) - threshold = 20000000; - if ( argc < 4 || sscanf( argv[3], "%d", &num_threads ) < 1 ) - num_threads = 32; - - td = malloc((num_threads+1) * sizeof(pthread_t)); - if (!td) { - test_fail( __FILE__, __LINE__, "td malloc failed", 1 ); - } - - if (!quiet) { - printf( "program_time = %d, threshold = %d, num_threads = %d\n\n", - program_time, threshold, num_threads ); - } - - if ( PAPI_library_init( PAPI_VER_CURRENT ) != PAPI_VER_CURRENT ) - test_fail( __FILE__, __LINE__, "PAPI_library_init failed", 1 ); - - /* Test to be sure we can add events */ - retval = PAPI_query_event( EVENT ); - if (retval!=PAPI_OK) { - if (!quiet) printf("Trouble finding event\n"); - test_skip(__FILE__,__LINE__,"Event not available",1); - } - - if ( PAPI_thread_init( ( unsigned long ( * )( void ) ) ( pthread_self ) ) != - PAPI_OK ) - test_fail( __FILE__, __LINE__, "PAPI_thread_init failed", 1 ); - - if ( pthread_key_create( &key, NULL ) != 0 ) - test_fail( __FILE__, __LINE__, "pthread key create failed", 1 ); - - gettimeofday( &start, NULL ); - - for ( n = 1; n <= num_threads; n++ ) { - if ( pthread_create( &(td[n]), NULL, my_thread, ( void * ) n ) != 0 ) - test_fail( __FILE__, __LINE__, "pthread create failed", 1 ); - } - - my_thread( ( void * ) 0 ); - - /* wait for all the threads */ - for ( n = 1; n <= num_threads; n++ ) { - if ( pthread_join( td[n], NULL)) - test_fail( __FILE__, __LINE__, "pthread join failed", 1 ); - } - - free(td); - - if (!quiet) printf( "done\n" ); - - test_pass( __FILE__ ); - - return 0; -} diff --git a/src/ftests/Makefile.target.in b/src/ftests/Makefile.target.in index 8006dd8..718586e 100644 --- a/src/ftests/Makefile.target.in +++ b/src/ftests/Makefile.target.in @@ -11,7 +11,7 @@ LIBRARY = @LIBRARY@ SHLIB=@SHLIB@ PAPILIB = ../@LINKLIB@ TESTLIB = $(testlibdir)/libtestlib.a -LDFLAGS = @LDFLAGS@ @LDL@ +LDFLAGS = @LDL@ CC = @CC@ F77 = @F77@ CC_R = @CC_R@ diff --git a/src/papi.c b/src/papi.c index 9903645..431d807 100644 --- a/src/papi.c +++ b/src/papi.c @@ -616,17 +616,23 @@ PAPI_library_init( int version ) _in_papi_library_init_cnt--; papi_return( init_retval ); } - + /* Initialize thread globals, including the main threads */ tmp = _papi_hwi_init_global_threads( ); if ( tmp ) { + int i; init_retval = tmp; _papi_hwi_shutdown_global_internal( ); + for ( i = 0; i < papi_num_components; i++ ) { + if (!_papi_hwd[i]->cmp_info.disabled) { + _papi_hwd[i]->shutdown_component( ); + } + } _in_papi_library_init_cnt--; papi_return( init_retval ); } - + init_level = PAPI_LOW_LEVEL_INITED; _in_papi_library_init_cnt--; diff --git a/src/papi_internal.c b/src/papi_internal.c index fa9f067..44a3bd5 100644 --- a/src/papi_internal.c +++ b/src/papi_internal.c @@ -111,12 +111,10 @@ _papi_hwi_free_papi_event_string() { } return; } - // A place to keep the current papi event code so some component functions can fetch its value // The current event code can be stored here prior to component calls and cleared after the component returns -static THREAD_LOCAL_STORAGE_KEYWORD unsigned int papi_event_code = -1; -static THREAD_LOCAL_STORAGE_KEYWORD int papi_event_code_changed = -1; - +static unsigned int papi_event_code = -1; +static int papi_event_code_changed = -1; void _papi_hwi_set_papi_event_code (unsigned int event_code, int update_flag) { INTDBG("new event_code: %#x, update_flag: %d, previous event_code: %#x\n", event_code, update_flag, papi_event_code); diff --git a/src/threads.c b/src/threads.c index 9f586c4..4dd0cf4 100644 --- a/src/threads.c +++ b/src/threads.c @@ -286,10 +286,6 @@ _papi_hwi_initialize_thread( ThreadInfo_t ** dest, int tid ) return PAPI_ENOMEM; } - /* init event memory variables, used by papi_internal.c */ - thread->tls_papi_event_code = -1; - thread->tls_papi_event_code_changed = -1; - /* Call the component to fill in anything special. */ for ( i = 0; i < papi_num_components; i++ ) { @@ -425,11 +421,6 @@ _papi_hwi_shutdown_thread( ThreadInfo_t * thread, int force_shutdown ) unsigned long tid; int i, failure = 0; - /* Clear event memory variables */ - thread->tls_papi_event_code = -1; - thread->tls_papi_event_code_changed = -1; - - /* Get thread id */ if ( _papi_hwi_thread_id_fn ) tid = ( *_papi_hwi_thread_id_fn ) ( ); else diff --git a/src/threads.h b/src/threads.h index 264d9f3..cd33690 100644 --- a/src/threads.h +++ b/src/threads.h @@ -30,11 +30,6 @@ typedef struct _ThreadInfo EventSetInfo_t **running_eventset; EventSetInfo_t *from_esi; /* ESI used for last update this control state */ int wants_signal; - - // The current event code can be stored here prior to - // component calls and cleared after the component returns. - unsigned int tls_papi_event_code; - int tls_papi_event_code_changed; } ThreadInfo_t; /** The list of threads, gets initialized to master process with TID of getpid() diff --git a/src/utils/Makefile.target.in b/src/utils/Makefile.target.in index 58d438a..a5eab43 100644 --- a/src/utils/Makefile.target.in +++ b/src/utils/Makefile.target.in @@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@ SHLIB=@SHLIB@ PAPILIB = ../@LINKLIB@ TESTLIB = $(testlibdir)/libtestlib.a -LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@ +LDFLAGS = @LDL@ @STATIC@ CC = @CC@ MPICC = @MPICC@ F77 = @F77@ diff --git a/src/validation_tests/Makefile.target.in b/src/validation_tests/Makefile.target.in index 58d438a..a5eab43 100644 --- a/src/validation_tests/Makefile.target.in +++ b/src/validation_tests/Makefile.target.in @@ -11,7 +11,7 @@ LIBRARY=@LIBRARY@ SHLIB=@SHLIB@ PAPILIB = ../@LINKLIB@ TESTLIB = $(testlibdir)/libtestlib.a -LDFLAGS = @LDFLAGS@ @LDL@ @STATIC@ +LDFLAGS = @LDL@ @STATIC@ CC = @CC@ MPICC = @MPICC@ F77 = @F77@