Evan Wilde
8112cda531
Updated F_Text and F_Append
...
These enum cases were also updated to OF_Text and OF_Append.
2021-06-23 14:29:52 -07:00
Alex Hoppen
7ce0e872b7
[Statistic] Refactor to make getInstructionsExecuted publically available
2021-05-20 16:02:41 +02:00
Alexis Laferrière
17e926e93b
[Basic] Don't use defined(LLVM_ENABLE_STATS) as it can be set to 0
...
LLVM_ENABLE_STATS can be defined to 0 since
https://reviews.llvm.org/D91094 .
rdar://73834542
2021-02-08 14:27:41 -08:00
Robert Widmann
638977454b
Remove SharedTimer Infrastructure
...
Teach the UnifiedStatsReporter to directly construct
llvm::NamedRegionTimer for itself.
2020-07-16 17:35:50 -07:00
David Zarzycki
fae2c19edb
NFC: Make SILType.h and SILDeclRef.h not depend on SIL/*.h
...
SILType and SILDeclRef do not actually need anything from SIL/*.h. Also,
a few dependencies can be pushed out of the headers into cpp files to
speed up incremental rebuilds.
2020-07-01 08:05:58 -04:00
Anthony Latsis
9fd1aa5d59
[NFC] Pre- increment and decrement where possible
2020-06-01 15:39:29 +03:00
Slava Pestov
368d47429d
Frontend: Remove coarse-grained dependency graph implementation
2020-04-29 16:55:53 -04: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
Joe Groff
fb34044408
Merge remote-tracking branch 'origin/master' into master-next
2019-12-10 12:46:41 -08:00
David Ungar
200b181eb3
Renaming files -> CoarseGrained
2019-12-04 10:51:18 -08:00
Adrian Prantl
468b74bd70
Update Swift master-next for upstream llvm.org changes.
2019-10-21 13:31:31 -07:00
Jonas Devlieghere
b4d268e9e1
Migrate llvm::make_unique to std::make_unique
...
Now that we've moved to C++14, we no longer need the llvm::make_unique
implementation from STLExtras.h. This patch is a mechanical replacement
of (hopefully) all the llvm::make_unique instances in the swift repo.
2019-08-15 11:32:39 -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
Graydon Hoare
5a563f59af
[Stats] Add SWIFTC_MAXIMUM_DETERMINISM to inhibit parallelism everywhere.
2018-09-13 16:15:49 -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
e7d0e0d47e
[Stats] Only update process-wide counters for frontends.
2018-08-30 14:55:07 -07:00
Graydon Hoare
fb7e7eb028
[Stats] Add statistic for Frontend.MaxMallocUsage.
2018-08-30 14:54:26 -07:00
Graydon Hoare
a25dd40fb9
[Stats] Clear all timers on print, since they stopped self-clearing recently.
2018-08-25 01:24:24 -07:00
Saleem Abdulrasool
4aa137f789
Basic: guard inclusion of unistd.h on non-Unices
...
unistd.h is a Unix specific header. Ensure that we do not try to include it on
non-unix environments (i.e. Windows). This attempts to restore the Windows
build once again.
2018-08-21 09:48:59 -07:00
Graydon Hoare
fe5667a4b6
[Stats] Change NumInstructions to NumInstructionsExecuted, accept 0 when on VMs.
2018-08-16 13:19:36 -07:00
Graydon Hoare
bdb00fceb0
Add Frontend.NumInstructions statistic, populated on macOS by rusage_info_v4.
2018-08-11 23:28:57 -07:00
swift-ci
336e42ee2c
Merge remote-tracking branch 'origin/master' into master-next
2018-05-17 15:09:01 -07:00
Graydon Hoare
dcbbafae6f
<rdar://40182303> Fix typo in error message, on failure to write stats file.
2018-05-17 13:03:07 -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
e86e3d2ac9
Merge remote-tracking branch 'origin/master' into master-next
2018-03-30 11:09:01 -07:00
Graydon Hoare
4b76ac0f6c
[Stats] Interpret ru_maxrss differently by platform.
2018-03-30 00:37:55 -07:00
swift-ci
bb170e0aaa
Merge remote-tracking branch 'origin/master' into master-next
2018-03-13 14:11:25 -07:00
Sho Ikeda
eaf33e0998
[gardening][lib/Basic] Replace typedef with using
2018-03-13 13:46:38 +09: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
bd5064d677
[Stats] Ensure timestamps are microseconds (linux default is nano)
2018-01-12 16:24:25 -08:00
Graydon Hoare
173e702da2
[Stats] Add a pair of counters to track failed processes.
2017-11-08 19:53:36 -08:00
Graydon Hoare
5d08866e56
[Stats] Warn on failure-to-write stats / trace files.
2017-10-05 19:06:06 -04:00
Graydon Hoare
0e5b982d25
[Stats] Only use input filename, not mangled path, in stats file name.
...
This was causing cases of very long input pathnames to be mangled into
stats filenames greater than 255 characters long, which in turn meant
stats files were not being written in some cases.
2017-10-03 17:10:25 -07:00
Graydon Hoare
77554c1ae2
[Stats] Fix typo.
2017-10-03 17:08:50 -07: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
85dda86130
Merge pull request #12071 from graydon/trace-stats-deltas
...
Trace stats deltas
2017-09-22 22:25:58 -07:00