]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix the namespace of the functions dealing with segment names.
authorFlorian Krohm <florian@eich-krohm.de>
Thu, 30 Apr 2015 17:34:04 +0000 (17:34 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Thu, 30 Apr 2015 17:34:04 +0000 (17:34 +0000)
As those are private to the address space manager they should
be ML_ not VG_ prefixed.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15165

coregrind/m_aspacemgr/aspacemgr-linux.c
coregrind/m_aspacemgr/aspacemgr-segnames.c
coregrind/m_aspacemgr/priv_aspacemgr.h

index d1740f7b872c56d6a1da4c53eb4c852d534a51db..d5e0be8f27beba2b1376214dbcc681c649f43df4 100644 (file)
@@ -421,7 +421,7 @@ static void show_len_concisely ( /*OUT*/HChar* buf, Addr start, Addr end )
 static void show_nsegment_full ( Int logLevel, Int segNo, const NSegment* seg )
 {
    HChar len_buf[20];
-   const HChar* name = VG_(am_get_segname)( seg->fnIdx );
+   const HChar* name = ML_(am_get_segname)( seg->fnIdx );
 
    if (name == NULL)
       name = "(none)";
@@ -439,7 +439,7 @@ static void show_nsegment_full ( Int logLevel, Int segNo, const NSegment* seg )
       seg->isCH ? 'H' : '-',
       show_ShrinkMode(seg->smode),
       seg->dev, seg->ino, seg->offset,
-      VG_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx,
+      ML_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx,
       name
    );
 }
@@ -486,7 +486,7 @@ static void show_nsegment ( Int logLevel, Int segNo, const NSegment* seg )
             seg->hasX ? 'x' : '-', seg->hasT ? 'T' : '-', 
             seg->isCH ? 'H' : '-',
             seg->dev, seg->ino, seg->offset,
-            VG_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx
+            ML_(am_segname_get_seqnr)(seg->fnIdx), seg->fnIdx
          );
          break;
 
@@ -520,7 +520,7 @@ void VG_(am_show_nsegments) ( Int logLevel, const HChar* who )
    VG_(debugLog)(logLevel, "aspacem",
                  "<<< SHOW_SEGMENTS: %s (%d segments)\n", 
                  who, nsegments_used);
-   VG_(am_show_segnames)( logLevel, who);
+   ML_(am_show_segnames)( logLevel, who);
    for (i = 0; i < nsegments_used; i++)
      show_nsegment( logLevel, i, &nsegments[i] );
    VG_(debugLog)(logLevel, "aspacem",
@@ -533,7 +533,7 @@ void VG_(am_show_nsegments) ( Int logLevel, const HChar* who )
 const HChar* VG_(am_get_filename)( NSegment const * seg )
 {
    aspacem_assert(seg);
-   return VG_(am_get_segname)( seg->fnIdx );
+   return ML_(am_get_segname)( seg->fnIdx );
 }
 
 /* Collect up the start addresses of segments whose kind matches one of
@@ -621,7 +621,7 @@ static Bool sane_NSegment ( const NSegment* s )
       case SkFileC: case SkFileV:
          return 
             s->smode == SmFixed
-            && VG_(am_sane_segname)(s->fnIdx)
+            && ML_(am_sane_segname)(s->fnIdx)
             && !s->isCH;
 
       case SkResvn: 
@@ -675,7 +675,7 @@ static Bool maybe_merge_nsegments ( NSegment* s1, const NSegment* s2 )
                               + ((ULong)s2->start) - ((ULong)s1->start) ) {
             s1->end = s2->end;
             s1->hasT |= s2->hasT;
-            VG_(am_dec_refcount)(s1->fnIdx);
+            ML_(am_dec_refcount)(s1->fnIdx);
             return True;
          }
          break;
@@ -1366,7 +1366,7 @@ static void split_nsegment_at ( Addr a )
       nsegments[i+1].offset 
          += ((ULong)nsegments[i+1].start) - ((ULong)nsegments[i].start);
 
-   VG_(am_inc_refcount)(nsegments[i].fnIdx);
+   ML_(am_inc_refcount)(nsegments[i].fnIdx);
 
    aspacem_assert(sane_NSegment(&nsegments[i]));
    aspacem_assert(sane_NSegment(&nsegments[i+1]));
@@ -1431,7 +1431,7 @@ static void add_segment ( const NSegment* seg )
       that decrement the reference counters for the segments names of
       the replaced segments. */
    for (i = iLo; i <= iHi; ++i)
-      VG_(am_dec_refcount)(nsegments[i].fnIdx);
+      ML_(am_dec_refcount)(nsegments[i].fnIdx);
    delta = iHi - iLo;
    aspacem_assert(delta >= 0);
    if (delta > 0) {
@@ -1528,7 +1528,7 @@ static void read_maps_callback ( Addr addr, SizeT len, UInt prot,
 #  endif // defined(VGP_arm_linux)
 
    if (filename)
-      seg.fnIdx = VG_(am_allocate_segname)( filename );
+      seg.fnIdx = ML_(am_allocate_segname)( filename );
 
    if (0) show_nsegment( 2,0, &seg );
    add_segment( &seg );
@@ -1570,7 +1570,7 @@ Addr VG_(am_startup) ( Addr sp_at_startup )
    aspacem_assert(sizeof(SSizeT) == sizeof(void*));
 
    /* Initialise the string table for segment names. */
-   VG_(am_segnames_init)();
+   ML_(am_segnames_init)();
 
    /* Check that we can store the largest imaginable dev, ino and
       offset numbers in an NSegment. */
@@ -2014,7 +2014,7 @@ VG_(am_notify_client_mmap)( Addr a, SizeT len, UInt prot, UInt flags,
          seg.mode = mode;
       }
       if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
-         seg.fnIdx = VG_(am_allocate_segname)( buf );
+         seg.fnIdx = ML_(am_allocate_segname)( buf );
       }
    }
    add_segment( &seg );
@@ -2236,9 +2236,9 @@ SysRes VG_(am_mmap_named_file_fixed_client)
       seg.mode = mode;
    }
    if (name) {
-      seg.fnIdx = VG_(am_allocate_segname)( name );
+      seg.fnIdx = ML_(am_allocate_segname)( name );
    } else if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
-      seg.fnIdx = VG_(am_allocate_segname)( buf );
+      seg.fnIdx = ML_(am_allocate_segname)( buf );
    }
    add_segment( &seg );
 
@@ -2543,7 +2543,7 @@ static SysRes VG_(am_mmap_file_float_valgrind_flags) ( SizeT length, UInt prot,
       seg.mode = mode;
    }
    if (ML_(am_resolve_filename)(fd, buf, VKI_PATH_MAX)) {
-      seg.fnIdx = VG_(am_allocate_segname)( buf );
+      seg.fnIdx = ML_(am_allocate_segname)( buf );
    }
    add_segment( &seg );
 
index 481b58ea886f498b24f7b83a4f19cc9de823dbe8..7fcacf4864be28b521b1e9218b2c7afc5eabe2db 100644 (file)
@@ -272,7 +272,7 @@ put_sentinel(UInt ix)
    If none is found, an index is allocated and the name stored.
    If running ouf of memory, return -1. */
 Int
-VG_(am_allocate_segname)(const HChar *name)
+ML_(am_allocate_segname)(const HChar *name)
 {
    UInt len, ix, size, next_freeslot;
 
@@ -349,7 +349,7 @@ VG_(am_allocate_segname)(const HChar *name)
 
 /* Debugging output */
 void
-VG_(am_show_segnames)(Int logLevel, const HChar *prefix)
+ML_(am_show_segnames)(Int logLevel, const HChar *prefix)
 {
    UInt size, ix, i;
 
@@ -378,7 +378,7 @@ VG_(am_show_segnames)(Int logLevel, const HChar *prefix)
    Used in aspacemgr debug output to associate a segment with
    a segment name. */
 Int
-VG_(am_segname_get_seqnr)(Int fnIdx)
+ML_(am_segname_get_seqnr)(Int fnIdx)
 {
    SizeT ix, size;
    Int seqnr = -1;
@@ -399,7 +399,7 @@ VG_(am_segname_get_seqnr)(Int fnIdx)
 /* Initialise the string table for segment names. It contains an empty
    string which is not referenced. */
 void
-VG_(am_segnames_init)(void)
+ML_(am_segnames_init)(void)
 {
    aspacem_assert(sizeof segnames >= overhead);
 
@@ -409,7 +409,7 @@ VG_(am_segnames_init)(void)
 
 /* Increase reference count of segment name identified by IX. */
 void
-VG_(am_inc_refcount)(Int ix)
+ML_(am_inc_refcount)(Int ix)
 {
    if (ix != -1)
       inc_refcount(ix);
@@ -417,20 +417,20 @@ VG_(am_inc_refcount)(Int ix)
 
 /* Decrease reference count of segment name identified by IX. */
 void
-VG_(am_dec_refcount)(Int ix)
+ML_(am_dec_refcount)(Int ix)
 {
    if (ix != -1)
       dec_refcount(ix);
 }
 
 Bool
-VG_(am_sane_segname)(Int ix)
+ML_(am_sane_segname)(Int ix)
 {
    return ix == -1 || (ix >= overhead && ix < segnames_used);
 }
 
 const HChar *
-VG_(am_get_segname)(Int ix)
+ML_(am_get_segname)(Int ix)
 {
    return (ix == -1) ? NULL : segnames + ix;
 }
index c36dc3af301037e0e65a6d5246023ac4e908d8ba..13d3dfff8ecee4ccbd5e5ad541a8391259821b77 100644 (file)
@@ -132,27 +132,27 @@ extern void ML_(am_do_sanity_check)( void );
 
 
 /* ------ Implemented in aspacemgr-segnames.c ------ */
-void VG_(am_segnames_init)(void);
-void VG_(am_show_segnames)(Int logLevel, const HChar *prefix);
+void ML_(am_segnames_init)(void);
+void ML_(am_show_segnames)(Int logLevel, const HChar *prefix);
 
 /* Put NAME into the string table of segment names. Return index for
    future reference. A return value of -1 indicates that the segment name
    could not be stored. Basically an out-of-memory situation. */
-Int VG_(am_allocate_segname)(const HChar *name);
+Int ML_(am_allocate_segname)(const HChar *name);
 
 /* Increment / decrement the reference counter for this segment name. */
-void VG_(am_inc_refcount)(Int);
-void VG_(am_dec_refcount)(Int);
+void ML_(am_inc_refcount)(Int);
+void ML_(am_dec_refcount)(Int);
 
 /* Check whether the segname index is sane. */
-Bool VG_(am_sane_segname)(Int fnIdx);
+Bool ML_(am_sane_segname)(Int fnIdx);
 
 /* Return the segment name for the given index. Maybe return NULL, if the
    segment does not have a name. */
-const HChar *VG_(am_get_segname)(Int fnIdx);
+const HChar *ML_(am_get_segname)(Int fnIdx);
 
 /* Return the sequence number of the segment name */
-Int VG_(am_segname_get_seqnr)(Int fnIdx);
+Int ML_(am_segname_get_seqnr)(Int fnIdx);
 
 #endif   // __PRIV_ASPACEMGR_H