From: Nicholas Nethercote Date: Fri, 26 Nov 2004 10:53:33 +0000 (+0000) Subject: Do some final "sk_" --> "tl_" changes that I missed earlier. X-Git-Tag: svn/VALGRIND_3_0_0~1212 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f8a005fa9a2622c4647b24ae0ec64c6ac5f39aef;p=thirdparty%2Fvalgrind.git Do some final "sk_" --> "tl_" changes that I missed earlier. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3106 --- diff --git a/coregrind/core.h b/coregrind/core.h index eff0df0044..090a7598d1 100644 --- a/coregrind/core.h +++ b/coregrind/core.h @@ -589,15 +589,15 @@ In core_asm.h: struct vg_mallocfunc_info { /* things vg_replace_malloc.o needs to know about */ - Addr sk_malloc; - Addr sk_calloc; - Addr sk_realloc; - Addr sk_memalign; - Addr sk___builtin_new; - Addr sk___builtin_vec_new; - Addr sk_free; - Addr sk___builtin_delete; - Addr sk___builtin_vec_delete; + Addr tl_malloc; + Addr tl_calloc; + Addr tl_realloc; + Addr tl_memalign; + Addr tl___builtin_new; + Addr tl___builtin_vec_new; + Addr tl_free; + Addr tl___builtin_delete; + Addr tl___builtin_vec_delete; Addr arena_payload_szB; @@ -609,7 +609,7 @@ struct vg_mallocfunc_info { Exports of vg_defaults.c ------------------------------------------------------------------ */ -extern Bool VG_(sk_malloc_called_by_scheduler); +extern Bool VG_(tl_malloc_called_by_scheduler); /* --------------------------------------------------------------------- Exports of vg_libpthread.c diff --git a/coregrind/vg_default.c b/coregrind/vg_default.c index 2283b53774..a5fe28d430 100644 --- a/coregrind/vg_default.c +++ b/coregrind/vg_default.c @@ -70,7 +70,7 @@ void malloc_panic ( const Char* fn ) __attribute__ ((weak)) UInt VG_(vg_malloc_redzone_szB) = 8; -Bool VG_(sk_malloc_called_by_scheduler) = False; +Bool VG_(tl_malloc_called_by_scheduler) = False; /* If the tool hasn't replaced malloc(), this one can be called from the scheduler, for the USERREQ__MALLOC user request used by vg_libpthread.c. @@ -81,7 +81,7 @@ Bool VG_(sk_malloc_called_by_scheduler) = False; __attribute__ ((weak)) void* TL_(malloc)( ThreadId tid, SizeT size ) { - if (VG_(sk_malloc_called_by_scheduler)) + if (VG_(tl_malloc_called_by_scheduler)) return VG_(cli_malloc)(VG_MIN_MALLOC_SZB, size); else malloc_panic(__PRETTY_FUNCTION__); @@ -91,7 +91,7 @@ __attribute__ ((weak)) void TL_(free)( ThreadId tid, void* p ) { /* see comment for TL_(malloc)() above */ - if (VG_(sk_malloc_called_by_scheduler)) + if (VG_(tl_malloc_called_by_scheduler)) VG_(cli_free)(p); else malloc_panic(__PRETTY_FUNCTION__); diff --git a/coregrind/vg_main.c b/coregrind/vg_main.c index 85b1660de3..a92af0fb2a 100644 --- a/coregrind/vg_main.c +++ b/coregrind/vg_main.c @@ -1258,7 +1258,7 @@ static void load_tool( const char *toolname, void** handle_out, ok = (toolinfo->sizeof_ToolInfo == sizeof(*toolinfo) && toolinfo->interface_major_version == VG_CORE_INTERFACE_MAJOR_VERSION && - toolinfo->sk_pre_clo_init != NULL); + toolinfo->tl_pre_clo_init != NULL); if (!ok) { fprintf(stderr, "Error:\n" " Tool and core interface versions do not match.\n" @@ -2527,7 +2527,7 @@ int main(int argc, char **argv) //-------------------------------------------------------------- // Build segment map (Valgrind segments only) // p: read proc/self/maps - // p: sk_pre_clo_init() [to setup new_mem_startup tracker] + // p: tl_pre_clo_init() [to setup new_mem_startup tracker] //-------------------------------------------------------------- VG_(parse_procselfmaps) ( build_valgrind_map_callback ); @@ -2543,7 +2543,7 @@ int main(int argc, char **argv) // p: parse_procselfmaps [so VG segments are setup so tool can // call VG_(malloc)] //-------------------------------------------------------------- - (*toolinfo->sk_pre_clo_init)(); + (*toolinfo->tl_pre_clo_init)(); VG_(tool_init_dlsym)(tool_dlhandle); VG_(sanity_check_needs)(); diff --git a/coregrind/vg_replace_malloc.c.base b/coregrind/vg_replace_malloc.c.base index 10a5658f0b..97cf3dbb71 100644 --- a/coregrind/vg_replace_malloc.c.base +++ b/coregrind/vg_replace_malloc.c.base @@ -103,7 +103,7 @@ LIBALIAS(void *, fff, (SizeT n)) \ MAYBE_SLOPPIFY(n); \ if (!init_done) init(); \ \ - v = (void*)VALGRIND_NON_SIMD_CALL1( info.sk_##vgfff, n ); \ + v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vgfff, n ); \ MALLOC_TRACE(" = %p", v ); \ return v; \ } @@ -117,7 +117,7 @@ LIBALIAS(void *, fff, (SizeT n)) \ MAYBE_SLOPPIFY(n); \ if (!init_done) init(); \ \ - v = (void*)VALGRIND_NON_SIMD_CALL1( info.sk_##vgfff, n ); \ + v = (void*)VALGRIND_NON_SIMD_CALL1( info.tl_##vgfff, n ); \ MALLOC_TRACE(" = %p", v ); \ if (NULL == v) { \ VALGRIND_PRINTF_BACKTRACE( \ @@ -147,7 +147,7 @@ LIBALIAS(void, fff, (void *p)) \ if (p == NULL) \ return; \ if (!init_done) init(); \ - (void)VALGRIND_NON_SIMD_CALL1( info.sk_##vgfff, p ); \ + (void)VALGRIND_NON_SIMD_CALL1( info.tl_##vgfff, p ); \ } FREE( free, free ); FREE( cfree, free ); @@ -172,7 +172,7 @@ LIBALIAS(void*, calloc, ( SizeT nmemb, SizeT size )) MAYBE_SLOPPIFY(size); if (!init_done) init(); - v = (void*)VALGRIND_NON_SIMD_CALL2( info.sk_calloc, nmemb, size ); + v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_calloc, nmemb, size ); MALLOC_TRACE(" = %p", v ); return v; } @@ -193,7 +193,7 @@ LIBALIAS(void*, realloc, ( void* ptrV, SizeT new_size )) return NULL; } if (!init_done) init(); - v = (void*)VALGRIND_NON_SIMD_CALL2( info.sk_realloc, ptrV, new_size ); + v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_realloc, ptrV, new_size ); MALLOC_TRACE(" = %p", v ); return v; } @@ -213,7 +213,7 @@ LIBALIAS(void*, memalign, ( SizeT alignment, SizeT n )) while (0 != (alignment & (alignment - 1))) alignment++; if (!init_done) init(); - v = (void*)VALGRIND_NON_SIMD_CALL2( info.sk_memalign, alignment, n ); + v = (void*)VALGRIND_NON_SIMD_CALL2( info.tl_memalign, alignment, n ); MALLOC_TRACE(" = %p", v ); return v; } diff --git a/coregrind/vg_scheduler.c b/coregrind/vg_scheduler.c index 9a395a1c3e..c80cfc752c 100644 --- a/coregrind/vg_scheduler.c +++ b/coregrind/vg_scheduler.c @@ -2951,17 +2951,17 @@ void do_client_request ( ThreadId tid, UWord* arg ) /* Note: for MALLOC and FREE, must set the appropriate "lock"... see the comment in vg_defaults.c/TL_(malloc)() for why. */ case VG_USERREQ__MALLOC: - VG_(sk_malloc_called_by_scheduler) = True; + VG_(tl_malloc_called_by_scheduler) = True; SET_PTHREQ_RETVAL( tid, (Addr)TL_(malloc) ( tid, arg[1] ) ); - VG_(sk_malloc_called_by_scheduler) = False; + VG_(tl_malloc_called_by_scheduler) = False; break; case VG_USERREQ__FREE: - VG_(sk_malloc_called_by_scheduler) = True; + VG_(tl_malloc_called_by_scheduler) = True; TL_(free) ( tid, (void*)arg[1] ); - VG_(sk_malloc_called_by_scheduler) = False; + VG_(tl_malloc_called_by_scheduler) = False; SET_PTHREQ_RETVAL(tid, 0); /* irrelevant */ break; @@ -3201,15 +3201,15 @@ void do_client_request ( ThreadId tid, UWord* arg ) case VG_USERREQ__GET_MALLOCFUNCS: { struct vg_mallocfunc_info *info = (struct vg_mallocfunc_info *)arg[1]; - info->sk_malloc = (Addr)TL_(malloc); - info->sk_calloc = (Addr)TL_(calloc); - info->sk_realloc = (Addr)TL_(realloc); - info->sk_memalign = (Addr)TL_(memalign); - info->sk___builtin_new = (Addr)TL_(__builtin_new); - info->sk___builtin_vec_new = (Addr)TL_(__builtin_vec_new); - info->sk_free = (Addr)TL_(free); - info->sk___builtin_delete = (Addr)TL_(__builtin_delete); - info->sk___builtin_vec_delete = (Addr)TL_(__builtin_vec_delete); + info->tl_malloc = (Addr)TL_(malloc); + info->tl_calloc = (Addr)TL_(calloc); + info->tl_realloc = (Addr)TL_(realloc); + info->tl_memalign = (Addr)TL_(memalign); + info->tl___builtin_new = (Addr)TL_(__builtin_new); + info->tl___builtin_vec_new = (Addr)TL_(__builtin_vec_new); + info->tl_free = (Addr)TL_(free); + info->tl___builtin_delete = (Addr)TL_(__builtin_delete); + info->tl___builtin_vec_delete = (Addr)TL_(__builtin_vec_delete); info->arena_payload_szB = (Addr)VG_(arena_payload_szB); diff --git a/include/tool.h.base b/include/tool.h.base index 90500290d9..3d01ef647f 100644 --- a/include/tool.h.base +++ b/include/tool.h.base @@ -105,7 +105,7 @@ typedef struct _ToolInfo { - register any tool-specific profiling events - any other tool-specific initialisation */ - void (*sk_pre_clo_init) ( void ); + void (*tl_pre_clo_init) ( void ); /* Specifies how big the shadow segment should be as a ratio to the client address space. 0 for no shadow segment. */ @@ -118,7 +118,7 @@ typedef struct _ToolInfo { .sizeof_ToolInfo = sizeof(ToolInfo), \ .interface_major_version = VG_CORE_INTERFACE_MAJOR_VERSION, \ .interface_minor_version = VG_CORE_INTERFACE_MINOR_VERSION, \ - .sk_pre_clo_init = pre_clo_init, \ + .tl_pre_clo_init = pre_clo_init, \ .shadow_ratio = shadow, \ };