diff options
author | florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2015-02-16 22:58:30 +0000 |
---|---|---|
committer | florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2015-02-16 22:58:30 +0000 |
commit | 6329ec86482987da1a179faaa8230ee346d90524 (patch) | |
tree | ae970831b6cf092b0d5298a20e9eae10c50de416 | |
parent | 1324b6f6e3e9f22404d1017fff4d944e2fe33acb (diff) | |
download | valgrind-6329ec86482987da1a179faaa8230ee346d90524.tar.gz |
Translations are allowed from all client segments. Update comments
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 a5019735-40e9-0310-863c-91ae7b9d1cf9
-rw-r--r-- | coregrind/m_aspacemgr/aspacemgr-linux.c | 9 | ||||
-rw-r--r-- | coregrind/m_translate.c | 4 | ||||
-rw-r--r-- | coregrind/pub_core_aspacemgr.h | 6 | ||||
-rw-r--r-- | include/pub_tool_aspacemgr.h | 2 |
4 files changed, 11 insertions, 10 deletions
diff --git a/coregrind/m_aspacemgr/aspacemgr-linux.c b/coregrind/m_aspacemgr/aspacemgr-linux.c index 6ab10440a..04611ff4d 100644 --- a/coregrind/m_aspacemgr/aspacemgr-linux.c +++ b/coregrind/m_aspacemgr/aspacemgr-linux.c @@ -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; } } diff --git a/coregrind/m_translate.c b/coregrind/m_translate.c index 8eb85b0c6..3ae779a0e 100644 --- a/coregrind/m_translate.c +++ b/coregrind/m_translate.c @@ -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. */ diff --git a/coregrind/pub_core_aspacemgr.h b/coregrind/pub_core_aspacemgr.h index aec6add1b..915c37a14 100644 --- a/coregrind/pub_core_aspacemgr.h +++ b/coregrind/pub_core_aspacemgr.h @@ -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 --- --- --- */ diff --git a/include/pub_tool_aspacemgr.h b/include/pub_tool_aspacemgr.h index e48652659..5edcb030f 100644 --- a/include/pub_tool_aspacemgr.h +++ b/include/pub_tool_aspacemgr.h @@ -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 |