[all-commits] [llvm/llvm-project] 57e364: [analyzer] Introduce per-entry-point statistics (#...
Arseniy Zaostrovnykh via All-commits
all-commits at lists.llvm.org
Mon Mar 17 00:23:53 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 57e36419b251f7e5a86566c86b4d61fbd605db5c
https://github.com/llvm/llvm-project/commit/57e36419b251f7e5a86566c86b4d61fbd605db5c
Author: Arseniy Zaostrovnykh <necto.ne at gmail.com>
Date: 2025-03-17 (Mon, 17 Mar 2025)
Changed paths:
M clang/docs/analyzer/developer-docs.rst
A clang/docs/analyzer/developer-docs/Statistics.rst
M clang/include/clang/StaticAnalyzer/Core/AnalyzerOptions.def
A clang/include/clang/StaticAnalyzer/Core/PathSensitive/EntryPointStats.h
M clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp
M clang/lib/StaticAnalyzer/Core/BugReporter.cpp
M clang/lib/StaticAnalyzer/Core/CMakeLists.txt
M clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
A clang/lib/StaticAnalyzer/Core/EntryPointStats.cpp
M clang/lib/StaticAnalyzer/Core/ExprEngine.cpp
M clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp
M clang/lib/StaticAnalyzer/Core/WorkList.cpp
M clang/lib/StaticAnalyzer/Core/Z3CrosscheckVisitor.cpp
M clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp
M clang/test/Analysis/analyzer-config.c
A clang/test/Analysis/analyzer-stats/entry-point-stats.cpp
A clang/test/Analysis/csv2json.py
M clang/test/lit.cfg.py
Log Message:
-----------
[analyzer] Introduce per-entry-point statistics (#131175)
So far CSA was relying on the LLVM Statistic package that allowed us to
gather some data about analysis of an entire translation unit. However,
the translation unit consists of a collection of loosely related entry
points. Aggregating data across multiple such entry points is often
counter productive.
This change introduces a new lightweight always-on facility to collect
Boolean or numerical statistics for each entry point and dump them in a
CSV format. Such format makes it easy to aggregate data across multiple
translation units and analyze it with common data-processing tools.
We break down the existing statistics that were collected on the per-TU
basis into values per entry point.
Additionally, we enable the statistics unconditionally (STATISTIC ->
ALWAYS_ENABLED_STATISTIC) to facilitate their use (you can gather the
data with a simple run-time flag rather than having to recompile the
analyzer). These statistics are very light and add virtually no
overhead.
Co-authored-by: Balazs Benics <benicsbalazs at gmail.com>
CPP-6160
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list