[m-rev.] diff: Remove broken parallel execution profiling code.

Paul Bone pbone at csse.unimelb.edu.au
Tue Nov 17 17:31:32 AEDT 2009


Remove broken parallel execution profiling code.

Parallel execution profiling can be enabled by defining
MR_PROFILE_PARALLEL_EXECUTION_SUPPORT when building the runtime, libraries and
applications.  This collects information about the performance of various
parallel execution operations such as the management of contexts and sparks.

in the case of sparks this was broken.  It had gone unnoticed since it was only
compiled in if the MR_join_and_continue macro was evaluated while
MR_PROFILE_PARALLEL_EXECUTION_SUPPORT was defined.  The C compiler would be
unable to compile any program making use of parallel conjunctions.

This commit removes the broken code, I plan to fix it and re-add it later.

runtime/mercury_context.h:
    As above.

Index: runtime/mercury_context.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_context.h,v
retrieving revision 1.54
diff -u -p -b -r1.54 mercury_context.h
--- runtime/mercury_context.h	5 Nov 2009 05:47:40 -0000	1.54
+++ runtime/mercury_context.h	17 Nov 2009 05:32:06 -0000
@@ -350,6 +350,7 @@ extern      MR_Context  *MR_runqueue_tai
 #if defined(MR_THREAD_SAFE) && defined(MR_PROFILE_PARALLEL_EXECUTION_SUPPORT) 
 extern MR_bool      MR_profile_parallel_execution;
 
+/* XXX: This is currently unused, we plan to use it in the future. -pbone */
 extern MR_Stats     MR_profile_parallel_executed_local_sparks;
 
 #define MR_IF_PROFILE_PARALLEL_EXECUTION_SUPPORT(statement)                 \
@@ -813,12 +814,6 @@ extern  void        MR_schedule_context(
   #define MR_join_and_continue(sync_term, join_label)                         \
     do {                                                                      \
         MR_SyncTerm *jnc_st = (MR_SyncTerm *) &sync_term;                     \
-MR_IF_PROFILE_PARALLEL_EXECUTION_SUPPORT(                                     \
-            MR_Timer MR_local_spark_timer;                                    \
-            if (MR_profile_parallel_execution == MR_TRUE) {                   \
-                MR_profiling_start_timer(&MR_local_spark_timer);              \
-            }                                                                 \
-        );                                                                    \
                                                                               \
         if (!jnc_st->MR_st_is_shared) {                                       \
             /* This parallel conjunction has only executed sequentially. */   \
@@ -870,11 +865,6 @@ MR_IF_PROFILE_PARALLEL_EXECUTION_SUPPORT
             &jnc_spark);                                                      \
         if (jnc_popped) {                                                     \
             MR_atomic_dec_int(&MR_num_outstanding_contexts_and_all_sparks);   \
-MR_IF_PROFILE_PARALLEL_EXECUTION_SUPPORT(                                     \
-            if (MR_profile_parallel_execution == MR_TRUE) {                   \
-                MR_profiling_stop_timer(&MR_local_spark_timer,                \
-                    &MR_profile_parallel_executed_local_sparks);              \
-            });                                                               \
             MR_GOTO(jnc_spark.MR_spark_resume);                               \
         } else {                                                              \
             MR_runnext();                                                     \
@@ -899,11 +889,6 @@ MR_IF_PROFILE_PARALLEL_EXECUTION_SUPPORT
             */                                                                \
             MR_UNLOCK(&MR_sync_term_lock, "continue_2 i");                    \
             MR_atomic_dec_int(&MR_num_outstanding_contexts_and_all_sparks);   \
-MR_IF_PROFILE_PARALLEL_EXECUTION_SUPPORT(                                     \
-            if (MR_profile_parallel_execution == MR_TRUE) {                   \
-                MR_profiling_stop_timer(&MR_local_spark_timer,                \
-                    &MR_profile_parallel_executed_local_sparks);              \
-            });                                                               \
             MR_GOTO(jnc_spark.MR_spark_resume);                               \
         } else {                                                              \
             /*                                                                \
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 489 bytes
Desc: Digital signature
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20091117/20e74184/attachment.sig>


More information about the reviews mailing list