From 66cb7e7293709d573c0d5e320507214e64127fde 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.

MERGED from commit 4e0a957758af94bc39ff51814bad54faf96a94b9
---
 rts/Profiling.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rts/Profiling.c b/rts/Profiling.c
index cc4d78e4487e..2544e00e2182 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -240,7 +240,8 @@ initProfilingLogFile(void)
 #endif
 
     if (RtsFlags.CcFlags.doCostCentres == 0 && 
-        RtsFlags.ProfFlags.doHeapProfile != HEAP_BY_RETAINER)
+        RtsFlags.ProfFlags.doHeapProfile != HEAP_BY_RETAINER &&
+        RtsFlags.ProfFlags.retainerSelector == NULL)
     {
         /* No need for the <prog>.prof file */
         prof_filename = NULL;
-- 
GitLab