X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FRetainerSet.c;h=bfa0bc8acfa947e3c5d8d4868856e872804b7255;hb=28a464a75e14cece5db40f2765a29348273ff2d2;hp=6834676dafd794f392922c4b34464d2a3a0ce0a9;hpb=2548429c5147b40adc0f14a78d24659462358d41;p=ghc-hetmet.git diff --git a/ghc/rts/RetainerSet.c b/ghc/rts/RetainerSet.c index 6834676..bfa0bc8 100644 --- a/ghc/rts/RetainerSet.c +++ b/ghc/rts/RetainerSet.c @@ -1,5 +1,4 @@ /* ----------------------------------------------------------------------------- - * $Id: RetainerSet.c,v 1.4 2003/03/25 17:58:49 sof Exp $ * * (c) The GHC Team, 2001 * Author: Sungwoo Park @@ -10,8 +9,6 @@ #ifdef PROFILING -#include - #include "Rts.h" #include "RtsFlags.h" #include "Stats.h" @@ -20,6 +17,7 @@ #include "Arena.h" #include "Profiling.h" +#include #include #define HASH_TABLE_SIZE 255 @@ -52,7 +50,7 @@ RetainerSet rs_MANY = { /* ----------------------------------------------------------------------------- * calculate the size of a RetainerSet structure * -------------------------------------------------------------------------- */ -static inline size_t +STATIC_INLINE size_t sizeofRetainerSet( int elems ) { return (sizeof(RetainerSet) + elems * sizeof(retainer)); @@ -90,7 +88,7 @@ refreshAllRetainerSet(void) for (i = 0; i < HASH_TABLE_SIZE; i++) hashTable[i] = NULL; nextId = 2; -#endif // FIRST_APPROACH +#endif /* FIRST_APPROACH */ } /* ----------------------------------------------------------------------------- @@ -148,7 +146,7 @@ addElement(retainer r, RetainerSet *rs) StgWord hk; // Hash Key #ifdef DEBUG_RETAINER - // fprintf(stderr, "addElement(%p, %p) = ", r, rs); + // debugBelch("addElement(%p, %p) = ", r, rs); #endif ASSERT(rs != NULL); @@ -188,7 +186,7 @@ addElement(retainer r, RetainerSet *rs) if (i < rs->num) continue; #ifdef DEBUG_RETAINER - // fprintf(stderr, "%p\n", nrs); + // debugBelch("%p\n", nrs); #endif // The set we are seeking already exists! return nrs; @@ -211,7 +209,7 @@ addElement(retainer r, RetainerSet *rs) hashTable[hash(hk)] = nrs; #ifdef DEBUG_RETAINER - // fprintf(stderr, "%p\n", nrs); + // debugBelch("%p\n", nrs); #endif return nrs; } @@ -495,6 +493,6 @@ outputAllRetainerSet(FILE *prof_file) stgFree(rsArray); } -#endif // SECOND_APPROACH +#endif /* SECOND_APPROACH */ #endif /* PROFILING */