summaryrefslogtreecommitdiff
path: root/rts/RtsFlags.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/RtsFlags.c')
-rw-r--r--rts/RtsFlags.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c
index f924432de4..5fd368cb61 100644
--- a/rts/RtsFlags.c
+++ b/rts/RtsFlags.c
@@ -304,6 +304,7 @@ usage_text[] = {
" -P More detailed Time/Allocation profile",
" -Pa Give information about *all* cost centres",
"",
+" -Pj Output cost-center profile in JSON format",
" -h<break-down> Heap residency profile (hp2ps) (output file <program>.hp)",
" break-down: c = cost centre stack (default)",
" m = module",
@@ -1059,13 +1060,14 @@ error = true;
error = true;
}
break;
+ case 'j':
+ RtsFlags.CcFlags.doCostCentres = COST_CENTRES_JSON;
+ break;
case '\0':
if (rts_argv[arg][1] == 'P') {
- RtsFlags.CcFlags.doCostCentres =
- COST_CENTRES_VERBOSE;
+ RtsFlags.CcFlags.doCostCentres = COST_CENTRES_VERBOSE;
} else {
- RtsFlags.CcFlags.doCostCentres =
- COST_CENTRES_SUMMARY;
+ RtsFlags.CcFlags.doCostCentres = COST_CENTRES_SUMMARY;
}
break;
default: