projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ea14522
)
Make LDV_FILL_SLOP use a forwards loop rather than a backwards loop
author
Ian Lynagh
<igloo@earth.li>
Fri, 6 Mar 2009 15:51:24 +0000
(15:51 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Fri, 6 Mar 2009 15:51:24 +0000
(15:51 +0000)
rts/LdvProfile.h
patch
|
blob
|
history
rts/sm/Evac.c
patch
|
blob
|
history
diff --git
a/rts/LdvProfile.h
b/rts/LdvProfile.h
index
5380c92
..
c61b010
100644
(file)
--- a/
rts/LdvProfile.h
+++ b/
rts/LdvProfile.h
@@
-24,11
+24,11
@@
extern void LdvCensusKillAll ( void );
// Invoked when:
// 1) Hp is incremented and exceeds HpLim (in Updates.hc).
// 2) copypart() is called (in GC.c).
// Invoked when:
// 1) Hp is incremented and exceeds HpLim (in Updates.hc).
// 2) copypart() is called (in GC.c).
-#define LDV_FILL_SLOP(from, howManyBackwards) \
+#define LDV_FILL_SLOP(from, howMany) \
if (era > 0) { \
int i; \
if (era > 0) { \
int i; \
- for (i = 1;i <= (howManyBackwards); i++) \
- ((StgWord *)(from))[-i] = 0; \
+ for (i = 0;i < (howMany); i++) \
+ ((StgWord *)(from))[i] = 0; \
}
// Informs the LDV profiler that closure c has just been evacuated.
}
// Informs the LDV profiler that closure c has just been evacuated.
diff --git
a/rts/sm/Evac.c
b/rts/sm/Evac.c
index
01cc0d8
..
1c453fc
100644
(file)
--- a/
rts/sm/Evac.c
+++ b/
rts/sm/Evac.c
@@
-212,7
+212,7
@@
spin:
SET_EVACUAEE_FOR_LDV(from, size_to_reserve);
// fill the slop
if (size_to_reserve - size_to_copy > 0)
SET_EVACUAEE_FOR_LDV(from, size_to_reserve);
// fill the slop
if (size_to_reserve - size_to_copy > 0)
- LDV_FILL_SLOP(to + size_to_reserve, (int)(size_to_reserve - size_to_copy));
+ LDV_FILL_SLOP(to + size_to_copy, (int)(size_to_reserve - size_to_copy));
#endif
return rtsTrue;
#endif
return rtsTrue;