[Perf][CI] Disable threshold based cost reports

Reviewed By: ezgicicek

Differential Revision: D9810693

fbshipit-source-id: fc07461cd
master
Martino Luca 6 years ago committed by Facebook Github Bot
parent c078bf5a12
commit aea1b4095e

@ -2195,6 +2195,11 @@ and unsafe_malloc =
"Assume that malloc(3) never returns null." "Assume that malloc(3) never returns null."
and use_cost_threshold =
CLOpt.mk_bool ~long:"use-cost-threshold" ~default:false
"Emit costs issues by comparing costs with a set threshold"
and version = and version =
let var = ref `None in let var = ref `None in
CLOpt.mk_set var `Full ~deprecated:["version"] ~long:"version" CLOpt.mk_set var `Full ~deprecated:["version"] ~long:"version"
@ -2980,6 +2985,8 @@ and uninit_interproc = !uninit_interproc
and unsafe_malloc = !unsafe_malloc and unsafe_malloc = !unsafe_malloc
and use_cost_threshold = !use_cost_threshold
and worklist_mode = !worklist_mode and worklist_mode = !worklist_mode
and write_dotty = !write_dotty and write_dotty = !write_dotty

@ -200,6 +200,8 @@ val undo_join : bool
val unsafe_unret : string val unsafe_unret : string
val use_cost_threshold : bool
val weak : string val weak : string
val whitelisted_cpp_methods : string list val whitelisted_cpp_methods : string list

@ -629,7 +629,9 @@ module TransferFunctionsWCET = struct
(* We don't report when the cost is Top as it corresponds to subsequent 'don't know's. (* We don't report when the cost is Top as it corresponds to subsequent 'don't know's.
Instead, we report Top cost only at the top level per function when `report_infinity` is set to true *) Instead, we report Top cost only at the top level per function when `report_infinity` is set to true *)
let should_report_cost cost = let should_report_cost cost =
(not (BasicCost.is_top cost)) && not (BasicCost.( <= ) ~lhs:cost ~rhs:expensive_threshold) Config.use_cost_threshold
&& (not (BasicCost.is_top cost))
&& not (BasicCost.( <= ) ~lhs:cost ~rhs:expensive_threshold)
let do_report summary loc cost = let do_report summary loc cost =

@ -8,7 +8,7 @@ TESTS_DIR = ../../..
ANALYZER = checkers ANALYZER = checkers
# see explanations in cpp/errors/Makefile for the custom isystem # see explanations in cpp/errors/Makefile for the custom isystem
CLANG_OPTIONS = -c CLANG_OPTIONS = -c
INFER_OPTIONS = --cost-only --debug-exceptions --project-root $(TESTS_DIR) INFER_OPTIONS = --cost-only --debug-exceptions --project-root $(TESTS_DIR) --use-cost-threshold
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.c) SOURCES = $(wildcard *.c)

@ -6,7 +6,7 @@
TESTS_DIR = ../../.. TESTS_DIR = ../../..
ANALYZER = checkers ANALYZER = checkers
INFER_OPTIONS = --cost-only --debug-exceptions INFER_OPTIONS = --cost-only --debug-exceptions --use-cost-threshold
INFERPRINT_OPTIONS = --issues-tests INFERPRINT_OPTIONS = --issues-tests
SOURCES = $(wildcard *.java) SOURCES = $(wildcard *.java)

Loading…
Cancel
Save