summaryrefslogtreecommitdiff
path: root/rts/PrimOps.cmm
diff options
context:
space:
mode:
authorDuncan Coutts <duncan@well-typed.com>2011-11-02 12:02:09 +0000
committerDuncan Coutts <duncan@well-typed.com>2011-11-04 14:13:10 +0000
commitc739d845f9b3fc67ee20aa3de7e876cb1327bb1a (patch)
treec3139330cdaa227854aa5fda007dd37e213d9295 /rts/PrimOps.cmm
parentd416d943ef59bafa0add5685ee0687f25db2d276 (diff)
downloadhaskell-c739d845f9b3fc67ee20aa3de7e876cb1327bb1a.tar.gz
Add eventlog event for thread labels
The existing GHC.Conc.labelThread will now also emit the the thread label into the eventlog. Profiling tools like ThreadScope could then use the thread labels rather than thread numbers.
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r--rts/PrimOps.cmm4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm
index c96e459975..85920932c9 100644
--- a/rts/PrimOps.cmm
+++ b/rts/PrimOps.cmm
@@ -631,8 +631,8 @@ stg_labelThreadzh
/* args:
R1 = ThreadId#
R2 = Addr# */
-#ifdef DEBUG
- foreign "C" labelThread(R1 "ptr", R2 "ptr") [];
+#if defined(DEBUG) || defined(TRACING) || defined(DTRACE)
+ foreign "C" labelThread(MyCapability() "ptr", R1 "ptr", R2 "ptr") [];
#endif
jump %ENTRY_CODE(Sp(0));
}