diff: runtime/mercury_heap.h memory profiling bug fix
Fergus Henderson
fjh at cs.mu.oz.au
Wed Dec 10 13:06:59 AEDT 1997
runtime/mercury_heap.h:
Fix a bug in the definition of incr_hp_msg() and incr_hp_msg_atomic()
that caused things to break if you enabled both value numbering
(i.e -O3) and memory profiling.
Index: mercury_heap.h
===================================================================
RCS file: /home/staff/zs/imp/mercury/runtime/mercury_heap.h,v
retrieving revision 1.3
diff -u -u -r1.3 mercury_heap.h
--- mercury_heap.h 1997/12/05 15:56:33 1.3
+++ mercury_heap.h 1997/12/10 01:54:01
@@ -144,16 +144,19 @@
/*
** The incr_hp*() macros are defined in terms of the tag_incr_hp*() macros.
+** Note: the `proclabel' argument is not parenthesized, since it must
+** be a label name; we may need to prefix `_entry_' in front of it,
+** which wouldn't work if it was parenthesized.
*/
#define incr_hp(dest, count) \
tag_incr_hp((dest), mktag(0), (count))
#define incr_hp_msg(dest, count, proclabel, type) \
- tag_incr_hp_msg((dest), mktag(0), (count), (proclabel), (type))
+ tag_incr_hp_msg((dest), mktag(0), (count), proclabel, (type))
#define incr_hp_atomic(dest, count) \
tag_incr_hp_atomic((dest), mktag(0), (count))
#define incr_hp_atomic_msg(dest, count, proclabel, type) \
tag_incr_hp_atomic_msg((dest), mktag(0), (count), \
- (proclabel), (type))
+ proclabel, (type))
/*
** Note that gcc optimizes `hp += 2; return hp - 2;'
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list