Commit Graph

46 Commits

Author SHA1 Message Date
Robert Widmann
638977454b Remove SharedTimer Infrastructure
Teach the UnifiedStatsReporter to directly construct
llvm::NamedRegionTimer for itself.
2020-07-16 17:35:50 -07:00
swift-ci
81a6a266aa Merge remote-tracking branch 'origin/master' into master-rebranch 2020-01-27 18:23:23 -08:00
David Ungar
d61f6f2f66 Changes to support per-type-body fingerprints. 2020-01-27 15:14:46 -08:00
Mike Ash
cd2b54f74e Merge branch 'master' into master-rebranch 2020-01-24 11:30:32 -05:00
Hamish Knight
fe906574cd [Basic] Avoid reentrant stat collection
Currently `UnifiedStatsReporter::flushTracesAndProfiles`
can kick off requests when computing the source
ranges for collected entities, which will try to
record additional stats about the requests.

This currently happens to work without issue,
but #29289 bumped the counters down slightly such
that the vector storing the stats now performs a
re-allocation when we do a reentrant stat entry.
This then caused a use-after-free as we try to
continue iterating over the old buffer.

Fix this issue by refusing to record any new stats
while we're flushing out the ones we've already
recorded.
2020-01-23 16:43:18 -08:00
Adrian Prantl
468b74bd70 Update Swift master-next for upstream llvm.org changes. 2019-10-21 13:31:31 -07:00
Jason Mittertreiner
8998235ed6 Enable Child Memory Usage Tracking on Windows (#23686)
Windows requires a handle to get memory usage, so do a slight refactor
to collect the child's memory usage as it exits instead of as the parent
is cleaning up.
2019-03-30 18:54:30 -07:00
Andrew Trick
8de89c392a Add a scale-test validation test for quadratic behavior during inlining.
Adds a stat to SILInstruction's transferNodesFromList to record the
number of times an instruction is transfered to another block. This is
the only way I can think of to detect quadratic behavior of passes
that split basic blocks.
2018-11-26 15:24:41 -08:00
Mark Lacey
72ba110e5b [ConstraintSystem] Rework new constraint stat as a FRONTEND_STATISTIC.
In the process, remove the old incrementScopeCounter SWIFT_FUNC_STAT.
2018-10-18 07:18:02 -07:00
Mark Lacey
cc0386b461 [ConstraintSystem] Add a new stat to be used for expression type checker performance testing.
This counts the number of leaf scopes we reach while solving the
constraint sytem, and is a much better measure of the growth of
unnecessary work than the total number of scopes opened.

There were two tests where I had a difficult time getting scale-test
to fit the curve even after adjusting some of the parameters, so I've
left those to use the old stat for now.
2018-10-17 07:26:18 -07:00
Graydon Hoare
5a563f59af [Stats] Add SWIFTC_MAXIMUM_DETERMINISM to inhibit parallelism everywhere. 2018-09-13 16:15:49 -07:00
Graydon Hoare
388e357218 [Stats] Add UnifiedStatsReporter tracing/profiling machinery to request-evaluator. 2018-09-02 02:00:07 -07:00
Graydon Hoare
1c87229104 [Stats] Flush Stats profiles and tracers at SILModule lifecycle boundary. 2018-09-01 00:05:58 -07:00
Graydon Hoare
044157821e [Stats] Assert main-thread-only use of UnifiedStatsReporter. 2018-09-01 00:05:58 -07:00
Graydon Hoare
ffa1bf1979 [Stats] Expand and improve traceable-entity vocabulary. 2018-09-01 00:05:58 -07:00
swift-ci
115f220410 Merge remote-tracking branch 'origin/master' into master-next 2018-04-11 22:15:16 -07:00
Saleem Abdulrasool
a80dd5b963 Basic: attempt to repair inverted dependencies
When linking on Linux, we would fail with unresolved symbol references
to swift::FrontendStatsTracer::getTraceFormatter<T>. The use of the
types, which are defined in swiftSIL occur in swiftBasic.  Provide
inline definitions of the constructors which cause the dependency on
some environments (e.g. Linux).
2018-04-10 10:40:10 -07:00
swift-ci
c2a6871095 Merge remote-tracking branch 'origin/master' into master-next 2018-02-21 19:28:52 -08:00
Graydon Hoare
628c446fe3 [Stats] Add -profile-stats-{events,entities} 2018-02-21 16:22:48 -08:00
Graydon Hoare
7fe97c77c5 [Stats] Permit negative counters and deltas. 2018-02-21 14:49:24 -08:00
Graydon Hoare
dd85e946e7 [Stats] Replace nonstandard SharedTimers with FrontendStatsTracers. 2018-02-21 14:49:24 -08:00
Graydon Hoare
819275945d [Stats] Replace RecursiveSharedTimer with FrontendStatsTracer. 2018-02-21 14:49:24 -08:00
Graydon Hoare
deabc3fe65 [Stats] Add a recursive-timers registry to UnifiedStatsReporter. 2018-02-21 14:49:24 -08:00
Graydon Hoare
5f01c19d8e [Stats] Add support for tracing protocol conformances. 2018-02-21 14:49:24 -08:00
Graydon Hoare
76b82accbc [Stats] Simplify FrontendStatsTracer uses and formatter-definitions. 2018-02-21 14:49:24 -08:00
Bob Wilson
ac1376a7ce master-next: Update Statistic initializers for LLVM r323999.
LLVM r323999 changed the Initialized field of llvm::Statistic from a
bool to std::atomic<bool>.
2018-02-04 18:58:38 -08:00
Graydon Hoare
9334779f33 [Stats] Reduce layering violations in FrontendStatsTracer. 2018-01-30 01:54:07 -08:00
Graydon Hoare
5f130a8d35 [Stats] Expand FrontendStatsTracer to trace multiple entity-types. 2018-01-21 23:37:54 -08:00
Graydon Hoare
173e702da2 [Stats] Add a pair of counters to track failed processes. 2017-11-08 19:53:36 -08:00
David Ungar
443ab7d950 git-clang-format 2017-09-26 18:02:35 -07:00
David Ungar
2af86f5cac First compiling run, WIP 2017-09-26 16:07:07 -07:00
Graydon Hoare
205f725d6e [stats] Add UnifiedStatsReporter::FrontendStatsTracer 2017-09-22 19:15:34 -04:00
Graydon Hoare
7e1cf168a8 [stats] Factor out UnifiedStatsReporter fields to a .def file 2017-09-22 02:01:06 -04:00
Graydon Hoare
f236ee6278 Merge pull request #11570 from graydon/slocps
Add NumSourceLines{,PerSecond} counters, fix SourceFile counters for WMO mode
2017-08-24 14:44:47 -07:00
David Ungar
c3e3d45396 Instrument NominalTypeDecl::lookupDirect
Also implement RecursiveSharedTimer
2017-08-23 14:53:53 -07:00
Graydon Hoare
fecffc9c8b [Stats] Add NumSourceLines{,PerSecond} counters. 2017-08-22 16:39:00 -07:00
Graydon Hoare
e10f483477 [Stats] Mangle a little more information into the file & timer names.
This helps disambiguate files that might otherwise be hard to sort through
if multiple runs output stats together in a single directory. The names
don't have to be perfect, just contain sufficient hints (and be parseable)
to differentiate module, arch, opt and output-type variation in jobs.
2017-06-02 18:08:31 -07:00
Graydon Hoare
56460309bc [Stats] Add always-on statistic for NumLLVMBytesOutput. 2017-05-31 17:30:40 -07:00
Graydon Hoare
4de8689f38 [Stats] Add always-on statistic for ChildrenMaxRSS. 2017-05-31 17:30:40 -07:00
Graydon Hoare
b5292f04f8 Add an assortment of new "always-on" metrics. 2017-04-28 13:56:13 -07:00
practicalswift
7eb7d5b109 [gardening] Fix 100 typos. 2017-04-18 17:01:42 +02:00
Graydon Hoare
a30f17306d [Stats] Add UnifiedStatsReporter class. 2017-04-03 17:20:37 -07:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
practicalswift
d58f3cc06a [gardening] Fix inconsistent header 2016-11-05 13:08:36 +01:00
Graydon Hoare
0755ca6b6b [Compile perf] Add include/swift/Basic/Statistic.h helper 2016-11-02 09:48:56 -07:00