Added check whether the trace environment already closed before create a new event (avoids potential segfault)
This commit was SVN r20913.
Этот коммит содержится в:
родитель
fa3cf2d2ba
Коммит
e66e5104e7
@ -236,6 +236,9 @@
|
||||
of 'cctype.h' in the sources of 'vtunify'
|
||||
|
||||
5.4.8
|
||||
- added wrapper for MPI function 'MPI_Init_thread'
|
||||
- fixed potential segmentation fault during shutdown the trace
|
||||
environment after tracing C++ programs
|
||||
- replaced usage of PATH_MAX by VT_PATH_MAX to avoid compile errors
|
||||
on some platforms
|
||||
|
||||
|
@ -161,6 +161,9 @@ void VT_Dyn_end(void* addr)
|
||||
{
|
||||
uint64_t time;
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
time = vt_pform_wtime();
|
||||
|
@ -111,6 +111,9 @@ void _ftrace_enter2_() {
|
||||
VT_MEMHOOKS_ON();
|
||||
}
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
/* -- ignore NEC OMP runtime functions -- */
|
||||
if ( strchr(func, '$') != NULL ) return;
|
||||
|
||||
@ -152,6 +155,9 @@ void _ftrace_exit2_() {
|
||||
char *func;
|
||||
uint64_t time;
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
func = (char *)vftr_getname();
|
||||
|
@ -355,6 +355,9 @@ void __cyg_profile_func_enter(void* func, void* callsite) {
|
||||
VT_MEMHOOKS_ON();
|
||||
}
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
time = vt_pform_wtime();
|
||||
@ -395,6 +398,9 @@ void __cyg_profile_func_exit(void* func, void* callsite) {
|
||||
void * funcptr = func;
|
||||
uint64_t time;
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
time = vt_pform_wtime();
|
||||
|
@ -78,6 +78,9 @@ void ___rouent2(struct s1 *p) {
|
||||
__rouinit();
|
||||
}
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
time = vt_pform_wtime();
|
||||
@ -137,6 +140,9 @@ void ___rouent2(struct s1 *p) {
|
||||
void ___rouret2(void) {
|
||||
uint64_t time;
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
time = vt_pform_wtime();
|
||||
|
@ -103,6 +103,9 @@ void phat_enter(char *str, int *id) {
|
||||
VT_MEMHOOKS_ON();
|
||||
}
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
/* -- ignore SUN OMP runtime functions -- */
|
||||
if ( strchr(str, '$') != NULL ) return;
|
||||
|
||||
@ -144,6 +147,9 @@ void phat_enter(char *str, int *id) {
|
||||
void phat_exit(char *str, int *id) {
|
||||
uint64_t time;
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
if ( *id == -1 ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
@ -109,6 +109,9 @@ void __func_trace_enter(char* name, char *fname, int lno) {
|
||||
VT_MEMHOOKS_ON();
|
||||
}
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
/* -- ignore IBM OMP runtime functions -- */
|
||||
if ( strchr(name, '@') != NULL ) return;
|
||||
|
||||
@ -150,6 +153,9 @@ void __func_trace_exit(char* name, char *fname, int lno) {
|
||||
HashNode *hn;
|
||||
uint64_t time;
|
||||
|
||||
/* -- if VampirTrace already finalized, return -- */
|
||||
if ( !vt_is_alive ) return;
|
||||
|
||||
VT_MEMHOOKS_OFF();
|
||||
|
||||
/* -- ignore IBM OMP runtime functions -- */
|
||||
|
@ -215,7 +215,8 @@ EXTERN int vt_io_tracing_state;
|
||||
* for each function separately via iofunctions[IDX].traceme = 0
|
||||
*/
|
||||
#define DO_TRACE() \
|
||||
( vt_io_tracing_enabled && \
|
||||
( vt_is_alive && \
|
||||
vt_io_tracing_enabled && \
|
||||
iofunctions[FUNC_IDX(VT_IOWRAP_THISFUNCNAME)].traceme )
|
||||
|
||||
/** Set up VT region and tracing specific settings
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user