[svn:parrot] r40535 - in branches/pluggable_runcore: compilers/imcc src/runcore

chromatic at svn.parrot.org chromatic at svn.parrot.org
Fri Aug 14 00:03:02 UTC 2009


Author: chromatic
Date: Fri Aug 14 00:02:58 2009
New Revision: 40535
URL: https://trac.parrot.org/parrot/changeset/40535

Log:
Fixed enabling of the profiling core; initialization code goes in the ->runops
pointer, confusingly -- preparing for a run is only effective for certain types
of cores which need special bytecode setup.

Modified:
   branches/pluggable_runcore/compilers/imcc/main.c
   branches/pluggable_runcore/src/runcore/cores.c

Modified: branches/pluggable_runcore/compilers/imcc/main.c
==============================================================================
--- branches/pluggable_runcore/compilers/imcc/main.c	Thu Aug 13 23:47:53 2009	(r40534)
+++ branches/pluggable_runcore/compilers/imcc/main.c	Fri Aug 14 00:02:58 2009	(r40535)
@@ -392,7 +392,7 @@
                 else if (STREQ(opt.opt_arg, "trace"))
                     core |= PARROT_SLOW_CORE;
                 else if (STREQ(opt.opt_arg, "profiling"))
-                    core |= PARROT_PROFILING_CORE;
+                    core  = PARROT_PROFILING_CORE;
                 else if (STREQ(opt.opt_arg, "gcdebug"))
                     core |= PARROT_GC_DEBUG_CORE;
                 else

Modified: branches/pluggable_runcore/src/runcore/cores.c
==============================================================================
--- branches/pluggable_runcore/src/runcore/cores.c	Thu Aug 13 23:47:53 2009	(r40534)
+++ branches/pluggable_runcore/src/runcore/cores.c	Fri Aug 14 00:02:58 2009	(r40535)
@@ -755,9 +755,9 @@
     Parrot_runcore_t *coredata = mem_allocate_typed(Parrot_runcore_t);
     coredata->name             = CONST_STRING(interp, "profiling");
     coredata->opinit           = PARROT_CORE_OPLIB_INIT;
-    coredata->runops           = runops_profiling_core;
-    coredata->prepare_run      = init_profiling_core;
+    coredata->runops           = init_profiling_core;
     coredata->destroy          = destroy_profiling_core;
+    coredata->prepare_run      = NULL;
 
     PARROT_RUNCORE_FUNC_TABLE_SET(coredata);
 
@@ -1022,7 +1022,7 @@
 {
     ASSERT_ARGS(init_profiling_core)
 
-    fprintf(stderr, "PROFILING INIT CALLED");
+    runcore->runops           = runops_profiling_core;
 
     return NULL;
 }


More information about the parrot-commits mailing list