Repository navigation
profile_cbmc.py: profile any command of CBMC's tools, also long ones - #9632
Draft
tautschnig wants to merge 1 commit into
Draft
tautschnig wants to merge 1 commit into
tautschnig wants to merge 1 commit into
Conversation
The profiling script ran cbmc on C files only, adding --dimacs and --verbosity, and its post-processing assumed short runs: it held the output of perf script in memory (gigabytes for a run of minutes), gave perf report and perf script two minutes, and recorded DWARF call graphs (16 KiB per sample). Profiling the goto-cc compilations and goto-ld links of a large build, or goto-instrument loading a large goto binary, needed all of that to change. - --command profiles the command line after "--" as it is, in the directory given by --cwd, under the name given by --name. The functions of the binary it runs (symbolic links such as goto-ld resolved, so goto-cc) count as CBMC code, and that binary is used for source locations if it has debug information. - --call-graph fp|dwarf|lbr, --frequency, --perf-timeout and --no-inline select perf's call-graph mode (frame pointers for long runs, with a build using -fno-omit-frame-pointer), the sampling frequency, the time limit of each post-processing step, and whether perf resolves inlined frames (slow on large recordings). - The output of perf script is piped into stackcollapse-perf.pl, and the folded stacks are kept in stacks.folded. - Each run records its wall time, CPU time and maximum resident set size (of perf and the command, from wait4), shown in a new table of the summary, which also lists the functions with the most samples including their callees. - A run that exceeds --timeout is sent SIGINT, so that perf record stops the command and writes out the samples collected so far, rather than being killed. Without the new options, cbmc runs are profiled as before, and their summary has the additional tables only. AGENTS.md shows an example. Co-authored-by: Kiro <kiro-agent@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #9632 +/- ##
===========================================
+ Coverage 81.29% 81.34% +0.04%
===========================================
Files 1725 1727 +2
Lines 191680 191715 +35
Branches 73 73
===========================================
+ Hits 155835 155951 +116
+ Misses 35845 35764 -81 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The profiling script ran cbmc on C files only, adding --dimacs and --verbosity, and its post-processing assumed short runs: it held the output of perf script in memory (gigabytes for a run of minutes), gave perf report and perf script two minutes, and recorded DWARF call graphs (16 KiB per sample). Profiling the goto-cc compilations and goto-ld links of a large build, or goto-instrument loading a large goto binary, needed all of that to change.
Without the new options, cbmc runs are profiled as before, and their summary has the additional tables only. AGENTS.md shows an example.