More rusage info added to the end of the run summary output enhancement (#1645)

* Added additional resource usage info for sim run.

* Fixed so voluntary context switches output uses corresponding ru_nvcsw instead of ru_nivcsw due to copy and paste error.

* Removed added resource usage data for page faults and block operations due to inconsistency on different OS.

* Updated to have voluntary and involuntary usage data for both initilization and run for sim shutdown run summary.
This commit is contained in:
Hong Chen
2024-02-29 14:52:41 -06:00
committed by GitHub
parent df5bdc3107
commit 2ac342cfc5
3 changed files with 33 additions and 12 deletions

View File

@ -60,6 +60,10 @@ int Trick::Executive::init() {
cpu_time = ((double) cpu_usage_buf.ru_stime.tv_sec) + ((double) cpu_usage_buf.ru_stime.tv_usec / 1000000.0);
kernal_cpu_init = cpu_time - kernal_cpu_start;
/* Record both voluntary and involuntary context switches usage for initialization */
v_context_switch_init = cpu_usage_buf.ru_nvcsw;
iv_context_switch_init = cpu_usage_buf.ru_nivcsw;
initialization_complete = true ;
/* Print as much error information avaiable for all exception and exit. */