Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
b63f725c
Commit
b63f725c
authored
3 years ago
by
Valentin Perrelle
Committed by
Andre Maroneze
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
[devel-tools] Add a helper to invoke frama-c within valgrind/callgrind
parent
1c3c2f62
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devel_tools/frama-c-callgrind
+31
-0
31 additions, 0 deletions
devel_tools/frama-c-callgrind
with
31 additions
and
0 deletions
devel_tools/frama-c-callgrind
0 → 100755
+
31
−
0
View file @
b63f725c
#!/bin/bash
# Script for profiling Frama-C with callgrind (a valgrind tool).
# Note: execution time with valgrind is about 15x-20x slower.
#
# Use this script at the root of the repository, so local_export.sh can be found
# in bin.
# For more focused results, you can activate the profiling only after entering
# a specific function. For instance, to only profile Eva, add
#
# --toggle-collect='*Eva__Analysis__force_compute*'
#
# to the command line below.
#
# Example of invocation :
#
# devel_tools/frama-c-callgrind tests/idct/*.c -eva -float-normal -no-warn-signed-overflow
#
# This creates a 'callgrind.out' file (Callgrind format), which can be viewed
# with a tool such as kcachegrind:
#
# kcachegrind callgrind.out
BASH_ARGV0
=
"bin/frama-c"
# hackish way to tell local_export that its dir is bin
.
bin/local_export.sh
valgrind
\
--tool
=
callgrind
--callgrind-out-file
=
callgrind.out
--dump-instr
=
yes
\
--separate-callers
=
2
--collect-jumps
=
yes
--fn-skip
=
'caml_*'
\
$BINDIR
/toplevel.opt
"
$@
"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment