Fix numa001 failure with "too many NUMA nodes"
[ghc.git] / rts / ProfHeap.c
index 956a250..a494a1b 100644 (file)
@@ -139,8 +139,7 @@ closureIdentity( const StgClosure *p )
         case CONSTR_2_0:
         case CONSTR_1_1:
         case CONSTR_0_2:
-        case CONSTR_STATIC:
-        case CONSTR_NOCAF_STATIC:
+        case CONSTR_NOCAF:
             return GET_CON_DESC(itbl_to_con_itbl(info));
         default:
             return closure_type_names[info->type];
@@ -400,6 +399,13 @@ initHeapProfiling(void)
         errorBelch("cannot mix -hb and -hr");
         stg_exit(EXIT_FAILURE);
     }
+#ifdef THREADED_RTS
+    // See Trac #12019.
+    if (doingLDVProfiling() && RtsFlags.ParFlags.nCapabilities > 1) {
+        errorBelch("-hb cannot be used with multiple capabilities");
+        stg_exit(EXIT_FAILURE);
+    }
+#endif
 #endif
 
     // we only count eras if we're doing LDV profiling.  Otherwise era
@@ -1019,7 +1025,6 @@ heapCensusChain( Census *census, bdescr *bd )
                 size = sizeofW(StgThunkHeader) + 1;
                 break;
 
-            case CONSTR:
             case FUN:
             case BLACKHOLE:
             case BLOCKING_QUEUE:
@@ -1028,6 +1033,8 @@ heapCensusChain( Census *census, bdescr *bd )
             case FUN_1_1:
             case FUN_0_2:
             case FUN_2_0:
+            case CONSTR:
+            case CONSTR_NOCAF:
             case CONSTR_1_0:
             case CONSTR_0_1:
             case CONSTR_1_1: