[purity] Disable clang

Reviewed By: jvillard

Differential Revision: D13118428

fbshipit-source-id: f4e86f286
master
Ezgi Çiçek 6 years ago committed by Facebook Github Bot
parent 77a5fbd7ba
commit 5fa89e2563

@ -116,19 +116,13 @@ let all_checkers =
( if Config.hoisting_report_only_expensive then
[(Procedure Cost.checker, Language.Clang); (Procedure Cost.checker, Language.Java)]
else [] )
@
if Config.purity then
[(Procedure Purity.checker, Language.Clang); (Procedure Purity.checker, Language.Java)]
else [] ) }
@ if Config.purity then [(Procedure Purity.checker, Language.Java)] else [] ) }
; { name= "Starvation analysis"
; active= Config.starvation
; callbacks=
[ (Procedure Starvation.analyze_procedure, Language.Java)
; (Cluster Starvation.reporting, Language.Java) ] }
; { name= "purity"
; active= Config.purity
; callbacks=
[(Procedure Purity.checker, Language.Clang); (Procedure Purity.checker, Language.Java)] }
; {name= "purity"; active= Config.purity; callbacks= [(Procedure Purity.checker, Language.Java)]}
; { name= "Class loading analysis"
; active= Config.class_loads
; callbacks= [(Procedure ClassLoads.analyze_procedure, Language.Java)] } ]

@ -160,6 +160,10 @@ codetoanalyze/c/performance/loops.c, larger_state_FN, 3, EXPENSIVE_EXECUTION_TIM
codetoanalyze/c/performance/loops.c, larger_state_FN, 4, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 1006, degree = 0]
codetoanalyze/c/performance/loops.c, larger_state_FN, 5, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 1006, degree = 0]
codetoanalyze/c/performance/loops.c, larger_state_FN, 7, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 1006, degree = 0]
codetoanalyze/c/performance/purity.c, loop, 2, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 7006, degree = 0]
codetoanalyze/c/performance/purity.c, loop, 2, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 7006, degree = 0]
codetoanalyze/c/performance/purity.c, loop, 3, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 7006, degree = 0]
codetoanalyze/c/performance/purity.c, loop, 6, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 7008, degree = 0]
codetoanalyze/c/performance/switch_continue.c, test_switch, 3, CONDITION_ALWAYS_TRUE, no_bucket, WARNING, [Here]
codetoanalyze/c/performance/switch_continue.c, test_switch, 3, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 602, degree = 0]
codetoanalyze/c/performance/switch_continue.c, test_switch, 4, EXPENSIVE_EXECUTION_TIME_CALL, no_bucket, ERROR, [with estimated cost 602, degree = 0]

@ -0,0 +1,16 @@
/*
* Copyright (c) 2018-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
void (*fun_ptr)(int);
// just to sanity check that we don't fail on cost with purity analysis enabled
int loop(int k) {
int p = 0;
for (int i = 0; i < 1000; i++) {
p = 3;
(*fun_ptr)(10);
}
return p;
}
Loading…
Cancel
Save