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
49d848e7
Commit
49d848e7
authored
3 months ago
by
David Bühler
Committed by
Thibault Martin
2 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[Eva] New parameter -eva-memory-footprint to configure the ocaml gc.
parent
3782c300
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/plugins/eva/engine/analysis.ml
+11
-6
11 additions, 6 deletions
src/plugins/eva/engine/analysis.ml
src/plugins/eva/parameters.ml
+14
-0
14 additions, 0 deletions
src/plugins/eva/parameters.ml
src/plugins/eva/parameters.mli
+2
-0
2 additions, 0 deletions
src/plugins/eva/parameters.mli
with
27 additions
and
6 deletions
src/plugins/eva/engine/analysis.ml
+
11
−
6
View file @
49d848e7
...
...
@@ -177,16 +177,21 @@ let () =
~
user_only
:
true
(
fun
_
->
reset_analyzer
()
);
Project
.
register_after_global_load_hook
reset_analyzer
let
tune_gc
()
=
if
Sys
.
ocaml_release
.
major
>=
5
then
let
minor_heap_size
=
8192000
in
let
space_overhead
=
40
in
Gc
.(
set
{
(
get
()
)
with
minor_heap_size
;
space_overhead
;
})
(* Configure the OCaml Garbage Collector according to the
-eva-memory-footprint parameter (only if it has been set). *)
let
configure_ocaml_gc
()
=
if
Parameters
.
MemoryFootprint
.
is_set
()
then
let
gc_control
=
Gc
.
get
()
in
let
n
=
Parameters
.
MemoryFootprint
.
get
()
in
let
values
=
[
|
24
;
30
;
40
;
60
;
90
;
120
;
150
;
190
;
240
;
300
|
]
in
let
space_overhead
=
values
.
(
n
-
1
)
in
if
space_overhead
<>
gc_control
.
space_overhead
then
Gc
.
set
{
gc_control
with
space_overhead
}
(* Builds the analyzer if needed, and run the analysis. *)
let
force_compute
()
=
configure_ocaml_gc
()
;
Ast
.
compute
()
;
tune_gc
()
;
Parameters
.
configure_precision
()
;
if
not
(
Kernel
.
AuditCheck
.
is_empty
()
)
then
Eva_audit
.
check_configuration
(
Kernel
.
AuditCheck
.
get
()
);
...
...
This diff is collapsed.
Click to expand it.
src/plugins/eva/parameters.ml
+
14
−
0
View file @
49d848e7
...
...
@@ -398,6 +398,20 @@ module JoinResults =
let
default
=
true
end
)
let
()
=
Parameter_customize
.
set_group
performance
module
MemoryFootprint
=
Int
(
struct
let
default
=
6
let
option_name
=
"-eva-memory-footprint"
let
arg_name
=
"n"
let
help
=
"Control the memory usage of the analysis. \
With smaller values, the analysis consumes much less memory but is \
also slightly slower. Must be between 1 and 10; default is 6."
end
)
let
()
=
MemoryFootprint
.
set_range
~
min
:
1
~
max
:
10
(* ------------------------------------------------------------------------- *)
(* --- Non-standard alarms --- *)
(* ------------------------------------------------------------------------- *)
...
...
This diff is collapsed.
Click to expand it.
src/plugins/eva/parameters.mli
+
2
−
0
View file @
49d848e7
...
...
@@ -58,6 +58,8 @@ module ResultsAll: Parameter_sig.Bool
module
JoinResults
:
Parameter_sig
.
Bool
module
MemoryFootprint
:
Parameter_sig
.
Int
module
WarnSignedConvertedDowncast
:
Parameter_sig
.
Bool
module
WarnPointerSubstraction
:
Parameter_sig
.
Bool
module
WarnCopyIndeterminate
:
Parameter_sig
.
Kernel_function_set
...
...
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