Verified Commit 057a42f5 authored by Camil Staps's avatar Camil Staps 🙂

Add project .. set -pg/-npg command to cpm to enable/disable callgraph profiling

parent 894fccdb
......@@ -52,6 +52,8 @@ from StdMaybe import :: Maybe
| StackTraceOff
| TimeProfileOn
| TimeProfileOff
| CallgraphProfileOn
| CallgraphProfileOff
| MemoryProfileOn
| MemoryProfileOff
| DescExLOn
......
......@@ -209,13 +209,17 @@ where
set_project_option RTSFlagsOn project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & disable_rts_flags=False} project
set_project_option TimeProfileOff project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=False, stack_traces=False} project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=False, callgraphProfiling=False, stack_traces=False} project
set_project_option TimeProfileOn project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=True, stack_traces=False} project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=True, callgraphProfiling=False, stack_traces=False} project
set_project_option CallgraphProfileOff project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=False, callgraphProfiling=False, stack_traces=False} project
set_project_option CallgraphProfileOn project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=True, callgraphProfiling=True, stack_traces=False} project
set_project_option StackTraceOff project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=False, stack_traces=False} project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=False, callgraphProfiling=False, stack_traces=False} project
set_project_option StackTraceOn project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=True, stack_traces=True} project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & profiling=True, callgraphProfiling=False, stack_traces=True} project
set_project_option MemoryProfileOff project
= PR_SetApplicationOptions {PR_GetApplicationOptions project & memoryProfiling=False} project
set_project_option MemoryProfileOn project
......@@ -269,8 +273,8 @@ doProjectAction _ _ _ _ world =
, " : -b,-nr,-nc,-sc"
, " : Set the output option to BasicValuesOnly, NoReturnType,"
, " : NoConsole or ShowConstructors respectively"
, " : -pt, -npt, -tst, ntst"
, " : Enable or disable time profiling and stack tracing"
, " : -pt, -npt, -pg, -npg, -tst, ntst"
, " : Enable or disable time/callgraph profiling and stack tracing"
, " : Note that these are mutually exclusive and if you select multiple, the last one will take effect"
, " : -mp, -nmp"
, " : Enable or disable memory profiling"
......
......@@ -140,7 +140,13 @@ parse_Project_options ["-pt":project_option_args]
= (ok, [TimeProfileOn:project_options]);
parse_Project_options ["-npt":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [TimeProfileOn:project_options]);
= (ok, [TimeProfileOff:project_options]);
parse_Project_options ["-pg":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [CallgraphProfileOn:project_options]);
parse_Project_options ["-npg":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [CallgraphProfileOff:project_options]);
parse_Project_options ["-tst":project_option_args]
# (ok,project_options) = parse_Project_options project_option_args;
= (ok, [StackTraceOn:project_options]);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment