]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Translations are allowed from all client segments. Update comments
authorFlorian Krohm <florian@eich-krohm.de>
Mon, 16 Feb 2015 22:58:30 +0000 (22:58 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Mon, 16 Feb 2015 22:58:30 +0000 (22:58 +0000)
and rename VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC) to
VG_(am_set_segment_hasT_if_client_segment). Change it so it handles
all client segments.

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

coregrind/m_aspacemgr/aspacemgr-linux.c
coregrind/m_translate.c
coregrind/pub_core_aspacemgr.h
include/pub_tool_aspacemgr.h

index 6ab10440a24ca0a570007336474080aa68e555b1..04611ff4d40e8a94ccd0c1560621c08902ca016c 100644 (file)
@@ -2710,13 +2710,14 @@ void VG_(am_set_segment_isCH_if_SkAnonC)( const NSegment* seg )
 }
 
 /* Same idea as VG_(am_set_segment_isCH_if_SkAnonC), except set the
-   segment's hasT bit (has-cached-code) if this is SkFileC or SkAnonC
-   segment. */
-void VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( const NSegment* seg )
+   segment's hasT bit (has-cached-code) if this is a client segment,
+   i.e. SkFileC, SkAnonC, or SkShmC. */
+void VG_(am_set_segment_hasT_if_client_segment)( const NSegment* seg )
 {
    aspacem_assert(seg != NULL);
    Int i = segAddr_to_index( seg );
-   if (nsegments[i].kind == SkAnonC || nsegments[i].kind == SkFileC) {
+   if (nsegments[i].kind == SkAnonC || nsegments[i].kind == SkFileC ||
+       nsegments[i].kind == SkShmC) {
       nsegments[i].hasT = True;
    }
 }
index 8eb85b0c6c987b2f535aeb3c6e88059b4125f04b..3ae779a0e0c569047b566d2ca33ba0a261f7e541 100644 (file)
@@ -1772,14 +1772,14 @@ Bool VG_(translate) ( ThreadId tid,
 
    vg_assert( vge.base[0] == addr );
    /* set 'translations taken from this segment' flag */
-   VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( seg );
+   VG_(am_set_segment_hasT_if_client_segment)( seg );
    } /* END new scope specially for 'seg' */
 
    for (i = 1; i < vge.n_used; i++) {
       NSegment const* seg 
          = VG_(am_find_nsegment)( vge.base[i] );
       /* set 'translations taken from this segment' flag */
-      VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( seg );
+      VG_(am_set_segment_hasT_if_client_segment)( seg );
    }
 
    /* Copy data at trans_addr into the translation cache. */
index aec6add1b77219362bf98443b70aebc51e5274c8..915c37a1479197595ac077afefdd11b771d260d3 100644 (file)
@@ -254,9 +254,9 @@ extern Bool VG_(am_change_ownership_v_to_c)( Addr start, SizeT len );
 extern void VG_(am_set_segment_isCH_if_SkAnonC)( const NSegment* seg );
 
 /* Same idea as VG_(am_set_segment_isCH_if_SkAnonC), except set the
-   segment's hasT bit (has-cached-code) if this is SkFileC or SkAnonC
-   segment. */
-extern void VG_(am_set_segment_hasT_if_SkFileC_or_SkAnonC)( const NSegment* );
+   segment's hasT bit (has-cached-code) if this is a client segment,
+   i.e. SkFileC, SkAnonC, or SkShmC. */
+extern void VG_(am_set_segment_hasT_if_client_segment)( const NSegment* );
 
 /* --- --- --- reservations --- --- --- */
 
index e48652659eadab5794e52151f3fd1831a71c9d11..5edcb030fb343b95c8e52ecce09f769cb85109e2 100644 (file)
@@ -87,7 +87,7 @@ typedef
         // segment has no permissions
         hasR==hasW==hasX == False
 
-     Also: hasT==True is only allowed in SkFileC and SkAnonC
+     Also: hasT==True is only allowed in SkFileC, SkAnonC, and SkShmC
            (viz, not allowed to make translations from non-client areas)
 */
 typedef