Branch: refs/heads/main
Revision: 6c23606
Author: aconsroe-hpe
Link: Add initial compiler/next query timing and tracing by aconsroe-hpe · Pull Request #19105 · chapel-lang/chapel · GitHub
Log Message:
Merge pull request #19105 from aconsroe-hpe/next/query-profiling-stats-pretty
Add initial compiler/next query timing and tracing
reviewed by @mppf
For performance profiling of compiler/next queries, this adds two
capabilities:
-
Context::setQueryTimingFlag(true)
records the time taken in
a) getMap
b) getResult
c) the query function body (timer starts after getResult) -
Context::{begin,end}QueryTimingTrace("/tmp/out.txt")
enables logging
the queries executed with their full callgraph structure (tree
suffices)
The query timing trace (quite a mouthful to say) has a postprocessor
analyze-query-trace that reconstructs the tree, computes time in self,
summarizes, and can plot the results in DOT
The timings themselves are stored inside the QueryMapBase because
these stats are small and already accessible in the query body.
This is excercised in testQueryTimingAndTrace
, but it is like
testInteractive
in that it is only really run interactively for now.
Modified Files:
A compiler/next/test/util/testQueryTimingAndTrace.cpp
A compiler/next/util/analyze-query-trace
M compiler/next/include/chpl/queries/Context-detail.h
M compiler/next/include/chpl/queries/Context.h
M compiler/next/include/chpl/queries/query-impl.h
M compiler/next/lib/queries/Context.cpp
M compiler/next/test/util/CMakeLists.txt
Compare: https://github.com/chapel-lang/chapel/compare/ccd4f366650b...6c236061d555