[m-rev.] Post-commit review: Improving profiling in RBMM

Quan Phan quan.phan at cs.kuleuven.be
Fri Dec 7 21:36:18 AEDT 2007


Hi,

I will commit this change because it is limited to only RBMM stuff.

Regards,
Quan.

-------------- next part --------------
Estimated hours taken: 2
Branch: main

- Fix the bug that some variables for profiling which are declared only if
  MR_RBMM_PROFILING is defined but are used even when the flag is off.
- Collect more profiling information in RBMM.

runtime/mercury_region.h
runtime/mercury_region.c
	Implement the above things. 
-------------- next part --------------
cvs diff: Diffing analysis
cvs diff: Diffing bench
cvs diff: Diffing bench/progs
cvs diff: Diffing bench/progs/compress
cvs diff: Diffing bench/progs/icfp2000
cvs diff: Diffing bench/progs/icfp2001
cvs diff: Diffing bench/progs/nuc
cvs diff: Diffing bench/progs/ray
cvs diff: Diffing bench/progs/tree234
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing boehm_gc/windows-untested
cvs diff: Diffing boehm_gc/windows-untested/vc60
cvs diff: Diffing boehm_gc/windows-untested/vc70
cvs diff: Diffing boehm_gc/windows-untested/vc71
cvs diff: Diffing browser
cvs diff: Diffing browser/test
cvs diff: Diffing bytecode
cvs diff: Diffing bytecode/test
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing detail
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/concurrency/samples
cvs diff: Diffing extras/concurrency/samples/midi
cvs diff: Diffing extras/concurrency/tests
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/exceptions
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lazy_evaluation/examples
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/opium_m
cvs diff: Diffing extras/opium_m/non-regression-tests
cvs diff: Diffing extras/opium_m/scripts
cvs diff: Diffing extras/opium_m/source
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/posix/samples
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/stream/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing quickcheck
cvs diff: Diffing quickcheck/tutes
cvs diff: Diffing readline
cvs diff: Diffing readline/doc
cvs diff: Diffing readline/examples
cvs diff: Diffing readline/shlib
cvs diff: Diffing readline/support
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_region.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_region.c,v
retrieving revision 1.4
diff -u -r1.4 mercury_region.c
--- runtime/mercury_region.c	22 Nov 2007 17:12:08 -0000	1.4
+++ runtime/mercury_region.c	6 Dec 2007 00:25:25 -0000
@@ -43,6 +43,12 @@
 double              MR_rbmmp_page_utilized;
 unsigned int        MR_rbmmp_words_snapshot_instant_reclaimed = 0;
 unsigned int        MR_rbmmp_pages_snapshot_instant_reclaimed = 0;
+MR_RegionProfUnit   MR_rbmmp_num_ite_frames = {0, 0, 0};
+MR_RegionProfUnit   MR_rbmmp_num_disj_frames = {0, 0, 0};
+MR_RegionProfUnit   MR_rbmmp_num_commit_frames = {0, 0, 0};
+MR_RegionProfUnit   MR_rbmmp_words_used_by_ite_frames = {0, 0, 0};
+MR_RegionProfUnit   MR_rbmmp_words_used_by_disj_frames = {0, 0, 0};
+MR_RegionProfUnit   MR_rbmmp_words_used_by_commit_frames = {0, 0, 0};
 
 #endif
 
@@ -877,6 +883,41 @@
     return number_of_pages;
 }
 
+int
+MR_region_get_ite_frame_size(MR_RegionIteFixedFrame *ite_frame)
+{
+    int     size;
+
+    size = 0;
+    size += MR_REGION_ITE_FRAME_FIXED_SIZE;
+    size += (ite_frame->MR_riff_num_prot_regions * MR_REGION_ITE_PROT_SIZE);
+    size += (ite_frame->MR_riff_num_snapshots * MR_REGION_ITE_SNAPSHOT_SIZE);
+    return size;
+}
+
+int
+MR_region_get_disj_frame_size(MR_RegionDisjFixedFrame *disj_frame)
+{
+    int     size;
+
+    size = 0;
+    size += MR_REGION_DISJ_FRAME_FIXED_SIZE;
+    size += (disj_frame->MR_rdff_num_snapshots * MR_REGION_DISJ_SNAPSHOT_SIZE);
+    return size;
+};
+
+int
+MR_region_get_commit_frame_size(MR_RegionCommitFixedFrame *commit_frame)
+{
+    int     size;
+
+    size = 0;
+    size += MR_REGION_COMMIT_FRAME_FIXED_SIZE;
+    size += (commit_frame->MR_rcff_num_saved_regions *
+        MR_REGION_COMMIT_FRAME_FIXED_SIZE);
+    return size;
+}
+
 void
 MR_region_print_profiling_unit(const char *str,
     MR_RegionProfUnit *profiling_unit)
@@ -910,6 +951,18 @@
         MR_rbmmp_words_snapshot_instant_reclaimed);
     printf("Pages instant reclaimed thanks to snapshot: %d.\n",
         MR_rbmmp_pages_snapshot_instant_reclaimed);
+    MR_region_print_profiling_unit("Ite frames used:",
+            &MR_rbmmp_num_ite_frames);
+    MR_region_print_profiling_unit("Disj frames used:",
+            &MR_rbmmp_num_disj_frames);
+    MR_region_print_profiling_unit("Commit frames used:",
+            &MR_rbmmp_num_commit_frames);
+    MR_region_print_profiling_unit("Words used by ite frames:",
+            &MR_rbmmp_words_used_by_ite_frames);
+    MR_region_print_profiling_unit("Words used by disj frames:",
+            &MR_rbmmp_words_used_by_disj_frames);
+    MR_region_print_profiling_unit("Words used by commit frames:",
+            &MR_rbmmp_words_used_by_commit_frames);
 }
 
 #else /* Not define MR_RBMM_PROFILING. */
Index: runtime/mercury_region.h
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_region.h,v
retrieving revision 1.5
diff -u -r1.5 mercury_region.h
--- runtime/mercury_region.h	22 Nov 2007 17:12:08 -0000	1.5
+++ runtime/mercury_region.h	6 Dec 2007 00:25:25 -0000
@@ -263,6 +263,7 @@
                 new_ite_frame->MR_riff_saved_sequence_number =              \
                     MR_region_sequence_number;                              \
                 MR_region_ite_sp = new_ite_frame;                           \
+                MR_region_profile_push_ite_frame;                           \
                 MR_region_debug_push_ite_frame(new_ite_frame);              \
             } while (0)
 
@@ -276,6 +277,7 @@
                 new_disj_frame->MR_rdff_saved_sequence_number =             \
                     MR_region_sequence_number;                              \
                 MR_region_disj_sp = new_disj_frame;                         \
+                MR_region_profile_push_disj_frame;                          \
                 MR_region_debug_push_disj_frame(new_disj_frame);            \
             } while (0)
 
@@ -291,6 +293,7 @@
                     MR_region_sequence_number;                              \
                 new_commit_frame->MR_rcff_saved_disj_sp = MR_region_disj_sp;\
                 MR_region_commit_sp = new_commit_frame;                     \
+                MR_region_profile_push_commit_frame;                        \
                 MR_region_debug_push_commit_frame(new_commit_frame);        \
             } while (0)
 
@@ -322,8 +325,7 @@
                     (region_slot_reg) = (MR_Word)(ite_prot + 1);            \
                     region->MR_region_ite_protected =                       \
                         (MR_RegionIteFixedFrame *) (ite_sp);                \
-                    MR_region_profile_increase_counter(                     \
-                        &MR_rbmmp_regions_protected_at_ite);                \
+                    MR_region_profile_fill_ite_protect;                     \
                     MR_region_debug_fill_ite_protect(ite_prot, region);     \
                 } else {                                                    \
                     MR_region_debug_fill_ite_protect(NULL, region);         \
@@ -361,8 +363,7 @@
                     MR_region_is_disj_protected(region))                    \
                 {                                                           \
                     MR_save_snapshot(region, snapshot);                     \
-                    MR_region_profile_increase_counter(                     \
-                        &MR_rbmmp_snapshots_saved_at_ite);                  \
+                    MR_region_profile_fill_ite_snapshot;                    \
                     (snapshot_block) = (MR_Word) (snapshot + 1);            \
                     (num_snapshots)++;                                      \
                     MR_region_debug_fill_ite_snapshot_removed(snapshot,     \
@@ -385,8 +386,7 @@
                 region = (MR_Region *) (region_ptr);                        \
                 snapshot = (MR_RegionSnapshot *) (snapshot_block);          \
                 MR_save_snapshot(region, snapshot);                         \
-                MR_region_profile_increase_counter(                         \
-                    &MR_rbmmp_snapshots_saved_at_ite);                      \
+                MR_region_profile_fill_ite_snapshot;                        \
                 (snapshot_block) = (MR_Word) (snapshot + 1);                \
                 (num_snapshots)++;                                          \
                 MR_region_debug_fill_ite_snapshot_not_removed(snapshot,     \
@@ -410,8 +410,7 @@
                 region = (MR_Region *) (region_ptr);                        \
                 snapshot = (MR_RegionSnapshot *) (snapshot_block);          \
                 MR_save_snapshot(region, snapshot);                         \
-                MR_region_profile_increase_counter(                         \
-                    &MR_rbmmp_snapshots_saved_at_disj);                     \
+                MR_region_profile_fill_disj_snapshot;                       \
                 (snapshot_block) = (MR_Word) (snapshot + 1);                \
                 (num_snapshots)++;                                          \
                 MR_region_debug_fill_disj_snapshot(snapshot, region);       \
@@ -440,8 +439,7 @@
                     (region_slot_reg) = (MR_Word) (commit_save + 1);        \
                     region->MR_region_commit_frame =                        \
                         (MR_RegionCommitFixedFrame *) (commit_sp);          \
-                    MR_region_profile_increase_counter(                     \
-                        &MR_rbmmp_regions_saved_at_commit);                 \
+                    MR_region_profile_fill_commit;                          \
                     MR_region_debug_fill_commit(commit_save, region);       \
                 } else {                                                    \
                     MR_region_debug_fill_commit(NULL, region);              \
@@ -633,6 +631,8 @@
                 MR_commit_success_destroy_marked_saved_regions(             \
                     top_commit_frame->MR_rcff_num_saved_regions,            \
                     first_commit_save);                                     \
+                MR_region_profile_pop_disj_frame(MR_region_disj_sp,         \
+                    top_commit_frame->MR_rcff_saved_disj_sp);               \
                 MR_region_disj_sp = top_commit_frame->MR_rcff_saved_disj_sp;\
                 MR_pop_region_commit_frame(top_commit_frame);               \
                 MR_region_debug_end("use_region_commit_success");           \
@@ -679,18 +679,22 @@
             do {                                                            \
                 MR_region_ite_sp =                                          \
                     top_ite_frame->MR_riff_previous_ite_frame;              \
+                MR_region_profile_pop_ite_frame(top_ite_frame);             \
             } while (0)
 
 #define     MR_pop_region_disj_frame(top_disj_frame)                        \
             do {                                                            \
                 MR_region_disj_sp =                                         \
                     top_disj_frame->MR_rdff_previous_disj_frame;            \
+                MR_region_profile_pop_disj_frame(top_disj_frame,            \
+                    top_disj_frame->MR_rdff_previous_disj_frame);           \
             } while (0)
 
 #define     MR_pop_region_commit_frame(top_commit_frame)                    \
             do {                                                            \
                 MR_region_commit_sp =                                       \
                     top_commit_frame->MR_rcff_previous_commit_frame;        \
+                MR_region_profile_pop_commit_frame(top_commit_frame);       \
             } while (0)
 
 /*---------------------------------------------------------------------------*/
@@ -960,7 +964,7 @@
     #define     MR_region_debug_restore_from_snapshot(snapshot)             \
                 MR_region_restore_from_snapshot_msg(snapshot)
 
-#else   /* MR_RBMM_DEBUG */
+#else   /* Not define MR_RBMM_DEBUG */
     #define     MR_region_debug_create_region(region)                       \
                 ((void) 0)
 
@@ -982,10 +986,10 @@
     #define     MR_region_debug_ite_frame(ite_sp);                          \
                 ((void) 0)
 
-    #define     MR_region_debug_ite_frame_protected_regions(ite_sp);        \
+    #define     MR_region_debug_ite_frame_protected_regions(ite_sp)         \
                 ((void) 0)
 
-    #define     MR_region_debug_ite_frame_snapshots(ite_sp);                \
+    #define     MR_region_debug_ite_frame_snapshots(ite_sp)                 \
                 ((void) 0)
 
     #define     MR_region_debug_push_disj_frame(disj_sp)                    \
@@ -994,7 +998,7 @@
     #define     MR_region_debug_disj_frame(frame)                           \
                 ((void) 0)
 
-    #define     MR_region_debug_disj_frame_snapshots(disj_sp);              \
+    #define     MR_region_debug_disj_frame_snapshots(disj_sp)               \
                 ((void) 0)
 
     #define     MR_region_debug_push_commit_frame(frame)                    \
@@ -1012,7 +1016,7 @@
     #define     MR_region_debug_end(name)                                   \
                 ((void) 0)
 
-    #define     MR_region_debug_fill_ite_protect(ite_prot, region);         \
+    #define     MR_region_debug_fill_ite_protect(ite_prot, region)          \
                 ((void) 0)
 
     #define     MR_region_debug_fill_ite_snapshot_not_removed(snapshot,     \
@@ -1025,16 +1029,16 @@
     #define     MR_region_debug_fill_disj_snapshot(snapshot, region)        \
                 ((void) 0)
 
-    #define     MR_region_debug_fill_commit(commit_save, region);           \
+    #define     MR_region_debug_fill_commit(commit_save, region)            \
                 ((void) 0)
 
     #define     MR_region_debug_ite_unprotect(protected_region)             \
                 ((void) 0)
 
-    #define     MR_region_debug_restore_from_snapshot(snapshot);            \
+    #define     MR_region_debug_restore_from_snapshot(snapshot)             \
                 ((void) 0)
 
-#endif /* MR_RBMM_DEBUG */
+#endif /* End of not define MR_RBMM_DEBUG */
 
 extern  void    MR_region_create_region_msg(MR_Region *region);
 extern  void    MR_region_try_remove_region_msg(MR_Region *region);
@@ -1115,11 +1119,156 @@
 extern unsigned int         MR_rbmmp_regions_saved_at_commit;
 extern unsigned int         MR_rbmmp_regions_protected_at_ite;
 extern unsigned int         MR_rbmmp_snapshots_saved_at_ite;
-extern unsigned int         MR_rbmmp_regions_protected_at_disj;
 extern unsigned int         MR_rbmmp_snapshots_saved_at_disj;
 extern double               MR_rbmmp_page_utilized;
+extern unsigned int         MR_rbmmp_words_snapshot_instant_reclaimed;
+extern unsigned int         MR_rbmmp_pages_snapshot_instant_reclaimed;
+extern MR_RegionProfUnit    MR_rbmmp_num_ite_frames;
+extern MR_RegionProfUnit    MR_rbmmp_num_disj_frames;
+extern MR_RegionProfUnit    MR_rbmmp_num_commit_frames;
+extern MR_RegionProfUnit    MR_rbmmp_words_used_by_ite_frames;
+extern MR_RegionProfUnit    MR_rbmmp_words_used_by_disj_frames;
+extern MR_RegionProfUnit    MR_rbmmp_words_used_by_commit_frames;
+
+extern  int     MR_region_get_ite_frame_size(MR_RegionIteFixedFrame *);
+extern  int     MR_region_get_disj_frame_size(MR_RegionDisjFixedFrame *);
+extern  int     MR_region_get_commit_frame_size(MR_RegionCommitFixedFrame *);
+
+#define     MR_region_profile_push_ite_frame                                \
+            do {                                                            \
+                MR_region_update_profiling_unit(&MR_rbmmp_num_ite_frames,   \
+                    1);                                                     \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_ite_frames,                     \
+                    MR_REGION_ITE_FRAME_FIXED_SIZE);                        \
+            } while (0)
+
+#define     MR_region_profile_push_disj_frame                               \
+            do {                                                            \
+                MR_region_update_profiling_unit(&MR_rbmmp_num_disj_frames,  \
+                    1);                                                     \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_disj_frames,                    \
+                    MR_REGION_DISJ_FRAME_FIXED_SIZE);                       \
+            } while (0)
+
+
+#define     MR_region_profile_push_commit_frame                             \
+            do {                                                            \
+                MR_region_update_profiling_unit(&MR_rbmmp_num_commit_frames,\
+                    1);                                                     \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_commit_frames,                  \
+                    MR_REGION_COMMIT_FRAME_FIXED_SIZE);                     \
+            } while (0)
+
+#define     MR_region_profile_pop_ite_frame(top_ite_frame)                  \
+            do {                                                            \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_ite_frames,                     \
+                    -MR_region_get_ite_frame_size(top_ite_frame));          \
+                MR_region_update_profiling_unit(&MR_rbmmp_num_ite_frames,   \
+                    -1);                                                    \
+            } while (0) 
+
+#define     MR_region_profile_pop_disj_frame(top_disj_frame,                \
+                new_top_disj_frame)                                         \
+            do {                                                            \
+                int                         num_popped_frames;              \
+                MR_RegionDisjFixedFrame     *disj_frame;                    \
+                                                                            \
+                num_popped_frames = 0;                                      \
+                disj_frame = top_disj_frame;                                \
+                while (disj_frame != new_top_disj_frame) {                  \
+                    num_popped_frames += 1;                                 \
+                    MR_region_update_profiling_unit(                        \
+                        &MR_rbmmp_words_used_by_disj_frames,                \
+                        -MR_region_get_disj_frame_size(disj_frame));        \
+                    disj_frame = disj_frame->MR_rdff_previous_disj_frame;   \
+                }                                                           \
+                MR_region_update_profiling_unit(&MR_rbmmp_num_disj_frames,  \
+                    -num_popped_frames);                                    \
+            } while (0)
+
+#define     MR_region_profile_pop_commit_frame(top_commit_frame)            \
+            do {                                                            \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_commit_frames,                  \
+                    -MR_region_get_commit_frame_size(top_commit_frame));    \
+                MR_region_update_profiling_unit(&MR_rbmmp_num_commit_frames,\
+                    -1);                                                    \
+            } while (0)
 
-#endif /* MR_RBMM_PROFILING. */
+#define     MR_region_profile_fill_ite_protect                              \
+            do {                                                            \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_ite_frames,                     \
+                    MR_REGION_ITE_PROT_SIZE);                               \
+                MR_region_profile_increase_counter(                         \
+                    &MR_rbmmp_regions_protected_at_ite);                    \
+            } while (0)
+            
+#define     MR_region_profile_fill_commit                                   \
+            do {                                                            \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_commit_frames,                  \
+                    MR_REGION_COMMIT_SAVE_SIZE);                            \
+                MR_region_profile_increase_counter(                         \
+                    &MR_rbmmp_regions_saved_at_commit);                     \
+            } while (0)
+            
+#define     MR_region_profile_fill_ite_snapshot                             \
+            do {                                                            \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_ite_frames,                     \
+                    MR_REGION_ITE_SNAPSHOT_SIZE);                           \
+                MR_region_profile_increase_counter(                         \
+                    &MR_rbmmp_snapshots_saved_at_ite);                      \
+            } while (0)
+
+#define     MR_region_profile_fill_disj_snapshot                            \
+            do {                                                            \
+                MR_region_update_profiling_unit(                            \
+                    &MR_rbmmp_words_used_by_disj_frames,                    \
+                    MR_REGION_DISJ_SNAPSHOT_SIZE);                          \
+                MR_region_profile_increase_counter(                         \
+                    &MR_rbmmp_snapshots_saved_at_disj);                     \
+            } while (0)
+
+#else   /* Not define MR_RBMM_PROFILING */
+
+#define     MR_region_profile_push_ite_frame                                \
+            ((void) 0)
+
+#define     MR_region_profile_push_disj_frame                               \
+            ((void) 0)
+
+#define     MR_region_profile_push_commit_frame                             \
+            ((void) 0)
+
+#define     MR_region_profile_pop_ite_frame(top_ite_frame);                 \
+            ((void) 0)
+
+#define     MR_region_profile_pop_disj_frame(top_disj_frame,                \
+                new_top_disj_frame)                                         \
+            ((void) 0)
+
+#define     MR_region_profile_pop_commit_frame(top_commit_frame);           \
+            ((void) 0)
+ 
+#define     MR_region_profile_fill_ite_protect                              \
+            ((void) 0)
+
+#define     MR_region_profile_fill_commit                                   \
+            ((void) 0)
+
+#define     MR_region_profile_fill_ite_snapshot                             \
+            ((void) 0)
+
+#define     MR_region_profile_fill_disj_snapshot                            \
+            ((void) 0)
+ 
+#endif  /* End of not define MR_RBMM_PROFILING. */
 
 extern  void    MR_region_update_profiling_unit(
                     MR_RegionProfUnit *profiling_unit, int quantity);
@@ -1128,6 +1277,7 @@
 extern  void    MR_region_profile_increase_counter(unsigned int *);
 extern  int     MR_region_get_number_of_pages(MR_RegionPage *,
                     MR_RegionPage *);
+
 extern  void    MR_region_print_profiling_info(void);
 /*---------------------------------------------------------------------------*/
 
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/standalone_c
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing ssdb
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing trax
cvs diff: Diffing trial
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax


More information about the reviews mailing list