]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Do some final "sk_" --> "tl_" changes that I missed earlier.
authorNicholas Nethercote <njn@valgrind.org>
Fri, 26 Nov 2004 10:53:33 +0000 (10:53 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Fri, 26 Nov 2004 10:53:33 +0000 (10:53 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3106

coregrind/core.h
coregrind/vg_default.c
coregrind/vg_main.c
coregrind/vg_replace_malloc.c.base
coregrind/vg_scheduler.c
include/tool.h.base

index eff0df0044b534fcb289e968cedddc33da8008ef..090a7598d1f12e9bbeadfa48f8bd0815a048cea8 100644 (file)
@@ -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
index 2283b53774bbc95ed13c1c015046df510b8e69de..a5fe28d430f303e631ea2b244f08478d9fedb1ee 100644 (file)
@@ -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__);
index 85b1660de398c60c94eb4d3f2553446dc99aa7d0..a92af0fb2a84024338a75d8c23c59055d5c2b5ab 100644 (file)
@@ -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)();
 
index 10a5658f0b89015f37219c6e57a4f2734cc89bee..97cf3dbb71380e2cf51ff5e0025cc3eb2b4b026c 100644 (file)
@@ -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;
 }
index 9a395a1c3e26b78eae61c2e5efa9f081b55e0a99..c80cfc752c09f5acf9d22bb6c75fbe7972ed0be3 100644 (file)
@@ -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);
         
index 90500290d98b57b5cca0d5864904a937c1d397d0..3d01ef647f952152075eae95a4eace531d956c88 100644 (file)
@@ -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,                                \
    };