[svn:parrot] r48890 - in trunk: config/auto config/gen/config_h src/gc
nwellnhof at svn.parrot.org
nwellnhof at svn.parrot.org
Thu Sep 9 20:54:17 UTC 2010
Author: nwellnhof
Date: Thu Sep 9 20:54:16 2010
New Revision: 48890
URL: https://trac.parrot.org/parrot/changeset/48890
Log:
[gc] Make sure that trace_system_stack is not inlined
Modified:
trunk/config/auto/gcc.pm
trunk/config/auto/msvc.pm
trunk/config/gen/config_h/config_h.in
trunk/src/gc/system.c
Modified: trunk/config/auto/gcc.pm
==============================================================================
--- trunk/config/auto/gcc.pm Thu Sep 9 20:20:26 2010 (r48889)
+++ trunk/config/auto/gcc.pm Thu Sep 9 20:54:16 2010 (r48890)
@@ -86,6 +86,7 @@
$conf->data->set( sym_export => '__attribute__ ((visibility("default")))' )
if $gccversion >= 4.0 && !$conf->data->get('sym_export');
+ $conf->data->set( noinline => '__attribute__ ((noinline))' );
# sneaky check for g++
my $gpp = (index($conf->data->get('cc'), '++') > 0) ? 1 : 0;
Modified: trunk/config/auto/msvc.pm
==============================================================================
--- trunk/config/auto/msvc.pm Thu Sep 9 20:20:26 2010 (r48889)
+++ trunk/config/auto/msvc.pm Thu Sep 9 20:54:16 2010 (r48890)
@@ -89,6 +89,9 @@
# for details.
$conf->data->add( " ", "ccflags", "-D_CRT_SECURE_NO_DEPRECATE" );
}
+
+ $conf->data->set( noinline => '__declspec(noinline)' );
+
return 1;
}
Modified: trunk/config/gen/config_h/config_h.in
==============================================================================
--- trunk/config/gen/config_h/config_h.in Thu Sep 9 20:20:26 2010 (r48889)
+++ trunk/config/gen/config_h/config_h.in Thu Sep 9 20:54:16 2010 (r48890)
@@ -84,6 +84,8 @@
#endif
#endif
+#define PARROT_NOINLINE @noinline@
+
#if defined(PARROT_IN_CORE)
/* Put any other symbols here. */
Modified: trunk/src/gc/system.c
==============================================================================
--- trunk/src/gc/system.c Thu Sep 9 20:20:26 2010 (r48889)
+++ trunk/src/gc/system.c Thu Sep 9 20:54:16 2010 (r48890)
@@ -234,12 +234,14 @@
Traces the memory block starting at C<< interp->lo_var_ptr >>. This should be
the address of a local variable which has been created on the stack early in
the interpreter's lifecycle. We trace until the address of another local stack
-variable in this function, which should be at the "top" of the stack.
+variable in this function, which should be at the "top" of the stack. For this
+reason, this function must never be inlined.
=cut
*/
+PARROT_NOINLINE
static void
trace_system_stack(PARROT_INTERP, ARGIN(const Memory_Pools *mem_pools))
{
More information about the parrot-commits
mailing list