Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisResult ¶
type AnalysisResult struct { AnalyzerState *dataflow.AnalyzerState // Ids contains the indices of Go calls. Ids[0] is always nil Ids []*ssa.Go // GoCalls contains the map from go calls to indices. The indices are >= 1, and such that for some go instruction // g, Ids[GoCalls[g]] == g GoCalls map[*ssa.Go]uint32 // NodeColors is a map from callgraph nodes (functions) to a set of go ids. That set should at least contain the // index 0 (no go routine) for all reachable nodes, and then any additional id means the function is called inside // a goroutine starting at instruction GoCalls[id] NodeColors map[*callgraph.Node]map[uint32]bool }
AnalysisResult contains all the information resulting from the Analyze function
func Analyze ¶
func Analyze(logger *config.LogGroup, config *config.Config, program *ssa.Program) (AnalysisResult, error)
Analyze runs all the concurrency specific analyses on the program with the configuration provided.
func RunAnalysis ¶
func RunAnalysis(state *dataflow.AnalyzerState) (AnalysisResult, error)
RunAnalysis runs the concurrency analysis on the program contained in the state. The dataflow analysis state must contain the program, as well as the results from the callgraph analysis and the pointer analysis
The analysis currently consists in:
- a first pass to collect all occurrences of `go ...` instructions
- a second pass to mark function with the all the `go ...` instructions they may be called from
Click to show internal directories.
Click to hide internal directories.