Ticket #7149: 0001-Profiling-open-.prof-when-hr-cc-is-specified.patch

File 0001-Profiling-open-.prof-when-hr-cc-is-specified.patch, 902 bytes (added by akio, 20 months ago)

A proposed patch

  • rts/Profiling.c

    From c20cb590a61e4aa65d0fc2a37416e405008af51c Mon Sep 17 00:00:00 2001
    From: Takano Akio <aljee@hyper.cx>
    Date: Wed, 15 Aug 2012 11:16:40 +0900
    Subject: [PATCH] Profiling: open .prof when -hr<cc> is specified
    
    The code for retainer profiling is used with e.g. +RTS -hc -hrfoo -RTS,
    as well as with +RTS -hr -RTS.
    ---
     rts/Profiling.c |    3 ++-
     1 files changed, 2 insertions(+), 1 deletions(-)
    
    diff --git a/rts/Profiling.c b/rts/Profiling.c
    index cc4d78e..2544e00 100644
    a b initProfilingLogFile(void) 
    240240#endif 
    241241 
    242242    if (RtsFlags.CcFlags.doCostCentres == 0 &&  
    243         RtsFlags.ProfFlags.doHeapProfile != HEAP_BY_RETAINER) 
     243        RtsFlags.ProfFlags.doHeapProfile != HEAP_BY_RETAINER && 
     244        RtsFlags.ProfFlags.retainerSelector == NULL) 
    244245    { 
    245246        /* No need for the <prog>.prof file */ 
    246247        prof_filename = NULL;