Argus.Extractor.CallSites (Panoptes v0.13.0)

Copy Markdown View Source

Every call instruction in a module, indexed once.

Twelve extractors match remote calls against their own tables, and each used to walk every instruction of every function to find them: a module was scanned once per extractor, and the OTP extractor scanned it four times on its own. The pipeline now builds this index once per module and extractors filter it, which is a walk over the call sites (a few percent of the instructions) instead of the instruction stream.

A site carries the same context the per-instruction scanners passed to their handlers — the function ID, the instruction list and the index — so the register-resolution helpers work unchanged.

Summary

Functions

The index for module_data: the one the pipeline attached, or a fresh one when an extractor is called on bare disassembly (as its unit tests do).

Indexes every remote and local call in functions.

Types

site()

@type site() :: %{
  func_id: String.t(),
  instrs: [tuple()],
  idx: non_neg_integer(),
  mfa: {module(), atom(), arity()},
  remote?: boolean()
}

Functions

for_module(map)

@spec for_module(map()) :: [site()]

The index for module_data: the one the pipeline attached, or a fresh one when an extractor is called on bare disassembly (as its unit tests do).

index(mod, functions)

@spec index(module(), [tuple()]) :: [site()]

Indexes every remote and local call in functions.