[svn:parrot] r40534 - in branches/pluggable_runcore: include/parrot src/runcore
cotto at svn.parrot.org
cotto at svn.parrot.org
Thu Aug 13 23:47:56 UTC 2009
Author: cotto
Date: Thu Aug 13 23:47:53 2009
New Revision: 40534
URL: https://trac.parrot.org/parrot/changeset/40534
Log:
[profiling] add stub init and destroy function for the profiling runcore, although they don't seem to get called atm
Modified:
branches/pluggable_runcore/include/parrot/runcore_api.h
branches/pluggable_runcore/src/runcore/cores.c
Modified: branches/pluggable_runcore/include/parrot/runcore_api.h
==============================================================================
--- branches/pluggable_runcore/include/parrot/runcore_api.h Thu Aug 13 23:03:39 2009 (r40533)
+++ branches/pluggable_runcore/include/parrot/runcore_api.h Thu Aug 13 23:47:53 2009 (r40534)
@@ -165,6 +165,12 @@
/* HEADERIZER BEGIN: src/runcore/cores.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
+PARROT_CAN_RETURN_NULL
+void * destroy_profiling_core(PARROT_INTERP,
+ ARGIN(Parrot_runcore_t *runcore))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
PARROT_WARN_UNUSED_RESULT
PARROT_CANNOT_RETURN_NULL
oplib_init_f get_core_op_lib_init(PARROT_INTERP,
@@ -183,6 +189,11 @@
__attribute__nonnull__(1)
__attribute__nonnull__(2);
+PARROT_CAN_RETURN_NULL
+void * init_profiling_core(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2);
+
void load_prederef(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
@@ -223,6 +234,9 @@
void Parrot_runcore_switch_jit_init(PARROT_INTERP)
__attribute__nonnull__(1);
+#define ASSERT_ARGS_destroy_profiling_core __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(runcore)
#define ASSERT_ARGS_get_core_op_lib_init __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore)
@@ -232,6 +246,9 @@
#define ASSERT_ARGS_init_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore)
+#define ASSERT_ARGS_init_profiling_core __attribute__unused__ int _ASSERT_ARGS_CHECK = \
+ PARROT_ASSERT_ARG(interp) \
+ || PARROT_ASSERT_ARG(runcore)
#define ASSERT_ARGS_load_prederef __attribute__unused__ int _ASSERT_ARGS_CHECK = \
PARROT_ASSERT_ARG(interp) \
|| PARROT_ASSERT_ARG(runcore)
Modified: branches/pluggable_runcore/src/runcore/cores.c
==============================================================================
--- branches/pluggable_runcore/src/runcore/cores.c Thu Aug 13 23:03:39 2009 (r40533)
+++ branches/pluggable_runcore/src/runcore/cores.c Thu Aug 13 23:47:53 2009 (r40534)
@@ -756,8 +756,8 @@
coredata->name = CONST_STRING(interp, "profiling");
coredata->opinit = PARROT_CORE_OPLIB_INIT;
coredata->runops = runops_profiling_core;
- coredata->prepare_run = NULL;
- coredata->destroy = NULL;
+ coredata->prepare_run = init_profiling_core;
+ coredata->destroy = destroy_profiling_core;
PARROT_RUNCORE_FUNC_TABLE_SET(coredata);
@@ -1008,6 +1008,27 @@
/*
+=item C<void * init_profiling_core(PARROT_INTERP, Parrot_runcore_t *runcore)>
+
+Perform initialization for the profiling runcore.
+
+=cut
+
+*/
+
+PARROT_CAN_RETURN_NULL
+void *
+init_profiling_core(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
+{
+ ASSERT_ARGS(init_profiling_core)
+
+ fprintf(stderr, "PROFILING INIT CALLED");
+
+ return NULL;
+}
+
+/*
+
=item C<static opcode_t * runops_profiling_core(PARROT_INTERP, Parrot_runcore_t
*runcore, opcode_t *pc)>
@@ -1162,6 +1183,28 @@
}
+
+/*
+
+=item C<void * destroy_profiling_core(PARROT_INTERP, Parrot_runcore_t *runcore)>
+
+Perform initialization for the profiling runcore.
+
+=cut
+
+*/
+
+PARROT_CAN_RETURN_NULL
+void *
+destroy_profiling_core(PARROT_INTERP, ARGIN(Parrot_runcore_t *runcore))
+{
+ ASSERT_ARGS(destroy_profiling_core)
+
+ fprintf(stderr,"PROFILING DESTRUCTOR CALLED\n");
+
+ return NULL;
+}
+
#undef code_start
#undef code_end
More information about the parrot-commits
mailing list