Summary:public Before this diff, the checker was collecting in a bottom-up fashion all possible call trees from `PerforamanceCritical`-annotated methods to `Expensive`-annotated ones. With this diff, we just collect the names of the direct transitively expensive callees and compute the expensive call stacks when reporting errors only. Reviewed By: sblackshear Differential Revision: D2938635 fb-gh-sync-id: dcdd13c shipit-source-id: dcdd13cmaster
parent
091f31dd17
commit
14d4f862eb
@ -1,27 +0,0 @@
|
||||
(*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*)
|
||||
|
||||
|
||||
module F = Format
|
||||
|
||||
type call = Procname.t * Location.t
|
||||
|
||||
type t =
|
||||
| Direct of call
|
||||
| Indirect of call * t list
|
||||
|
||||
|
||||
let pp fmt tree =
|
||||
let rec loop stack = function
|
||||
| Direct (pname, _) ->
|
||||
F.fprintf fmt "%s -> %s" stack (Procname.to_string pname)
|
||||
| Indirect ((pname, _), l) ->
|
||||
let stack' = stack ^ " -> " ^ (Procname.to_string pname) in
|
||||
IList.iter (loop stack') l in
|
||||
loop "@" tree
|
@ -1,18 +0,0 @@
|
||||
(*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*)
|
||||
|
||||
type call = Procname.t * Location.t
|
||||
|
||||
(** data-structure to represent call stacks in a compact tree form *)
|
||||
type t =
|
||||
| Direct of call
|
||||
| Indirect of call * t list
|
||||
|
||||
(** print the list of call stacks in the tree *)
|
||||
val pp : Format.formatter -> t -> unit
|
Loading…
Reference in new issue