-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[NFC] Remove -debug-time-compilation #32938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
#include "clang/Basic/SourceLocation.h" | ||
#include "clang/Basic/SourceManager.h" | ||
#include "swift/Basic/Statistic.h" | ||
#include "swift/Basic/Timer.h" | ||
#include "swift/AST/Decl.h" | ||
#include "swift/AST/Expr.h" | ||
#include "llvm/ADT/DenseMap.h" | ||
|
@@ -146,9 +145,8 @@ auxName(StringRef ModuleName, | |
} | ||
|
||
class UnifiedStatsReporter::RecursionSafeTimers { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are there any of these left in the compiler? If not, were they replaced by something else? A quick search of the code seems to say there are none. Is NamedRegionTimer already recursion-safe? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's hard to see usages because of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, but I was looking for the individual uses in the code, like: |
||
|
||
struct RecursionSafeTimer { | ||
llvm::Optional<SharedTimer> Timer; | ||
llvm::Optional<llvm::NamedRegionTimer> Timer; | ||
size_t RecursionDepth; | ||
}; | ||
|
||
|
@@ -159,7 +157,7 @@ class UnifiedStatsReporter::RecursionSafeTimers { | |
void beginTimer(StringRef Name) { | ||
RecursionSafeTimer &T = Timers[Name]; | ||
if (T.RecursionDepth == 0) { | ||
T.Timer.emplace(Name); | ||
T.Timer.emplace(Name, Name, "swift", "Swift compilation"); | ||
} | ||
++T.RecursionDepth; | ||
} | ||
|
@@ -354,7 +352,6 @@ UnifiedStatsReporter::UnifiedStatsReporter(StringRef ProgramName, | |
path::append(TraceFilename, makeTraceFileName(ProgramName, AuxName)); | ||
path::append(ProfileDirname, makeProfileDirName(ProgramName, AuxName)); | ||
EnableStatistics(/*PrintOnExit=*/false); | ||
SharedTimer::enableCompilationTimers(); | ||
if (TraceEvents || ProfileEvents || ProfileEntities) | ||
LastTracedFrontendCounters.emplace(); | ||
if (TraceEvents) | ||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that what was nice about this was that it was an easy way to get per-frontend-per-phase info. How would you do that now? I'm sorry to see it go, but I think there are no RecursionSafeTimers in the compiler anymore.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have to use the full
-stats-dir
output.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's a loss, but not your fault, since the flag doesn't work anymore.