diff --git a/infer/man/man1/infer-analyze.txt b/infer/man/man1/infer-analyze.txt index 47790de62..8a1774422 100644 --- a/infer/man/man1/infer-analyze.txt +++ b/infer/man/man1/infer-analyze.txt @@ -335,10 +335,6 @@ OPTIONS Activates: Enable siof and disable all other checkers (Conversely: --no-siof-only) - --specs-shard-depth int - Specify the depth of the directory structure of specs, used for - "sharding" .specs files. Zero turns sharding off. - --sqlite-cache-size int SQLite cache size in pages (if positive) or kB (if negative), follows formal of corresponding SQLite PRAGMA. diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index 6bd9a43d3..f8f36483a 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -1104,10 +1104,6 @@ OPTIONS Deactivates: print code excerpts around trace elements (Conversely: --source-preview) See also infer-explore(1). - --specs-shard-depth int - Specify the depth of the directory structure of specs, used for - "sharding" .specs files. Zero turns sharding off. See also infer-analyze(1) and infer-run(1). - --sqlite-cache-size int SQLite cache size in pages (if positive) or kB (if negative), follows formal of corresponding SQLite PRAGMA. See also infer-analyze(1), infer-capture(1), and infer-run(1). diff --git a/infer/man/man1/infer-run.txt b/infer/man/man1/infer-run.txt index 607949440..68d8f4ce3 100644 --- a/infer/man/man1/infer-run.txt +++ b/infer/man/man1/infer-run.txt @@ -133,10 +133,6 @@ OPTIONS Ignore files whose path matches the given prefix (can be specified multiple times) - --specs-shard-depth int - Specify the depth of the directory structure of specs, used for - "sharding" .specs files. Zero turns sharding off. - --sqlite-cache-size int SQLite cache size in pages (if positive) or kB (if negative), follows formal of corresponding SQLite PRAGMA. diff --git a/infer/man/man1/infer.txt b/infer/man/man1/infer.txt index 1fa0b007f..137d42a91 100644 --- a/infer/man/man1/infer.txt +++ b/infer/man/man1/infer.txt @@ -1104,10 +1104,6 @@ OPTIONS Deactivates: print code excerpts around trace elements (Conversely: --source-preview) See also infer-explore(1). - --specs-shard-depth int - Specify the depth of the directory structure of specs, used for - "sharding" .specs files. Zero turns sharding off. See also infer-analyze(1) and infer-run(1). - --sqlite-cache-size int SQLite cache size in pages (if positive) or kB (if negative), follows formal of corresponding SQLite PRAGMA. See also infer-analyze(1), infer-capture(1), and infer-run(1). diff --git a/infer/src/IR/Procname.ml b/infer/src/IR/Procname.ml index 72bbab9d8..b64b18e62 100644 --- a/infer/src/IR/Procname.ml +++ b/infer/src/IR/Procname.ml @@ -758,7 +758,7 @@ let get_qualifiers pname = QualifiedCppName.empty -let to_filename_and_crc pname = +let to_filename pname = (* filenames for clang procs are REVERSED qualifiers with '#' as separator *) let pp_rev_qualified fmt pname = let rev_qualifiers = get_qualifiers pname |> QualifiedCppName.to_rev_list in @@ -776,12 +776,9 @@ let to_filename_and_crc pname = | _ -> F.asprintf "%a" pp_unique_id pname in - DB.append_crc_cutoff proc_id + DB.append_crc_cutoff proc_id |> fst -(** Convert a proc name to a filename *) -let to_filename pname = to_filename_and_crc pname |> fst - module SQLite = struct module T = struct type nonrec t = t [@@deriving compare] diff --git a/infer/src/IR/Procname.mli b/infer/src/IR/Procname.mli index 8d80db03f..b98a2cb31 100644 --- a/infer/src/IR/Procname.mli +++ b/infer/src/IR/Procname.mli @@ -341,9 +341,6 @@ val pp_unique_id : F.formatter -> t -> unit val to_unique_id : t -> string (** Convert a proc name into a unique identifier. *) -val to_filename_and_crc : t -> string * string -(** Convert a proc name to a filename and crc. *) - val to_filename : t -> string (** Convert a proc name to a filename. *) diff --git a/infer/src/backend/Summary.ml b/infer/src/backend/Summary.ml index 466447a9a..f7cc93781 100644 --- a/infer/src/backend/Summary.ml +++ b/infer/src/backend/Summary.ml @@ -188,26 +188,15 @@ module OnDisk = struct Procname.Hash.replace cache proc_name summary - let specs_filename_and_crc pname = - let pname_file, crc = Procname.to_filename_and_crc pname in - (pname_file ^ Config.specs_files_suffix, crc) + let specs_filename pname = + let pname_file = Procname.to_filename pname in + pname_file ^ Config.specs_files_suffix - let specs_filename pname = specs_filename_and_crc pname |> fst - (** Return the path to the .specs file for the given procedure in the current results directory *) let specs_filename_of_procname pname = - let filename, crc = specs_filename_and_crc pname in - let sharded_filename = - if Serialization.is_shard_mode then - let shard_dirs = - String.sub crc ~pos:0 ~len:Config.specs_shard_depth - |> String.concat_map ~sep:"/" ~f:Char.to_string - in - shard_dirs ^/ filename - else filename - in - DB.filename_from_string (ResultsDir.get_path Specs ^/ sharded_filename) + let filename = specs_filename pname in + DB.filename_from_string (ResultsDir.get_path Specs ^/ filename) (** paths to the .specs file for the given procedure in the models folder *) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 46f1d36af..2e88a1da7 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -2172,13 +2172,6 @@ and starvation_whole_program = "Run whole-program starvation analysis" -and specs_shard_depth = - CLOpt.mk_int ~long:"specs-shard-depth" ~default:0 - ~in_help:InferCommand.[(Analyze, manual_generic); (Run, manual_generic)] - "Specify the depth of the directory structure of specs, used for \"sharding\" .specs files. \ - Zero turns sharding off." - - and sqlite_cache_size = CLOpt.mk_int ~long:"sqlite-cache-size" ~default:2000 ~in_help: @@ -3112,12 +3105,6 @@ and sources = !sources and sourcepath = !sourcepath -and specs_shard_depth = - if 0 <= !specs_shard_depth && !specs_shard_depth <= 32 then !specs_shard_depth - else - L.die UserError "Invalid number of shard depths %d: must be between 0 and 32" !specs_shard_depth - - and sqlite_cache_size = !sqlite_cache_size and sqlite_page_size = !sqlite_page_size diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index f0f7bb585..060ac4c19 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -551,8 +551,6 @@ val source_files_type_environment : bool val source_preview : bool -val specs_shard_depth : int - val sqlite_cache_size : int val sqlite_page_size : int diff --git a/infer/src/base/Serialization.ml b/infer/src/base/Serialization.ml index b8d7ef2ce..3b797ed20 100644 --- a/infer/src/base/Serialization.ml +++ b/infer/src/base/Serialization.ml @@ -31,8 +31,6 @@ end (** version of the binary files, to be incremented for each change *) let version = 27 -let is_shard_mode = (not Config.biabduction_models_mode) && Config.specs_shard_depth > 0 - let create_serializer (key : Key.t) : 'a serializer = let read_data ((key' : int), (version' : int), (value : 'a)) source_msg = if key.key <> key' then ( @@ -66,7 +64,6 @@ let create_serializer (key : Key.t) : 'a serializer = let filename = DB.filename_to_string fname in PerfEvent.( log (fun logger -> log_begin_event logger ~name:("writing " ^ key.name) ~categories:["io"] ())) ; - if is_shard_mode then Utils.create_dir (Filename.dirname filename) ; Utils.with_intermediate_temp_file_out filename ~f:(fun outc -> Marshal.to_channel outc (key.key, version, data) [] ) ; PerfEvent.(log (fun logger -> log_end_event logger ())) diff --git a/infer/src/base/Serialization.mli b/infer/src/base/Serialization.mli index 5a8561708..b97376398 100644 --- a/infer/src/base/Serialization.mli +++ b/infer/src/base/Serialization.mli @@ -27,9 +27,6 @@ end (** Generic serializer *) type 'a serializer -val is_shard_mode : bool -(** If the spec directory is sharded or not *) - val create_serializer : Key.t -> 'a serializer (** create a serializer from a file name given an integer key used as double-check of the file type *)