Author: florian
Date: Mon Feb 16 22:58:30 2015
New Revision: 14936
Log:
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.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_translate.c
trunk/coregrind/pub_core_aspacemgr.h
trunk/include/pub_tool_aspacemgr.h
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c Mon Feb 16 22:58:30 2015
@@ -2710,13 +2710,14 @@
}
/* 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;
}
}
Modified: trunk/coregrind/m_translate.c
==============================================================================
--- trunk/coregrind/m_translate.c (original)
+++ trunk/coregrind/m_translate.c Mon Feb 16 22:58:30 2015
@@ -1772,14 +1772,14 @@
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. */
Modified: trunk/coregrind/pub_core_aspacemgr.h
==============================================================================
--- trunk/coregrind/pub_core_aspacemgr.h (original)
+++ trunk/coregrind/pub_core_aspacemgr.h Mon Feb 16 22:58:30 2015
@@ -254,9 +254,9 @@
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 --- --- --- */
Modified: trunk/include/pub_tool_aspacemgr.h
==============================================================================
--- trunk/include/pub_tool_aspacemgr.h (original)
+++ trunk/include/pub_tool_aspacemgr.h Mon Feb 16 22:58:30 2015
@@ -87,7 +87,7 @@
// 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
|