Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed Time break-down compilation mode #10

Open
rbertran opened this issue Jun 17, 2019 · 1 comment
Open

Detailed Time break-down compilation mode #10

rbertran opened this issue Jun 17, 2019 · 1 comment

Comments

@rbertran
Copy link
Collaborator

rbertran commented Jun 17, 2019

Enable a timing mode when compiling that collects the time spent in each phase.

Regarding the breakdown, I was thinking in the following categories:

  • Application time
  • Profiler time
    • Init time (fork + first instrumentation)
    • start region of interest time (fix traps and insert calls)
    • end region of interest time (fix traps and insert calls)
  • Support library time:
    • protect time
      • protect mem, system call time
      • IO time (write regs to disk)
      • other protect time (e.g.read all registers state, etc.)
    • unprotect time
      • unprotect system call time
      • other protect time
    • sighandler time
      • IO time (write)
      • unprotect system call time
      • other sighandler time

Regarding on how to implement it:

This should a be a configuration option during the compilation (e.g. -DTIMING in cmake), so that we can remove the timing overhead when needed. We need to implement this using architecture specific low level mechanisms when possible (e.g. STCKE instructions in Z, or MFTB in POWER) to read the time. Much faster: 1 instruction vs. 1 system call . If TIMING is enabled, reports are generated in stdout by default or in a file if TIMING_REPORT_FILE environment variable is defined with a filename.

@rbertran
Copy link
Collaborator Author

rbertran commented Mar 2, 2022

Compute totals time for each category above, and also:
Average and std. deviation (using Welford's online algorithm https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant