-
Notifications
You must be signed in to change notification settings - Fork 10.5k
adjust for SVN r286524 and SVN r287369 #5890
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
Conversation
Groups are required for Timers after SVN r286524. SVN r287369 requires that timers have short names and long descriptions. Adjust the API usage accordingly. Reorder some words to make some more sense as a description.
@swift-ci please smoke test and merge |
Something went wrong with those tests. Let's try again. @swift-ci please smoke test and merge |
I guess this has to go in along with the corresponding LLVM changes. I'll just include it in the next merge. |
@swift-ci Please smoke test |
@@ -33,7 +33,8 @@ namespace swift { | |||
public: | |||
explicit SharedTimer(StringRef name) { | |||
if (CompilationTimersEnabled == State::Enabled) | |||
Timer.emplace(name, StringRef("Swift compilation")); | |||
Timer.emplace(name, StringRef("Swift compilation"), StringRef("swift"), |
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 would rather use Timer.emplace(name, name, StringRef("swift"), ...)
otherwise all timers will end up with the same description (the human readable output only shows the description and not the name currently).
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.
Out of curiosity, why the extra wrapping in StringRef(…)
?
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.
For all I know the extra StringRef is completely unnecessary here and was just maintained because it was already there before...
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, I left them there for consistency. The default constructor should work. Id rather get this merged and then follow up with a cleanup patch to remove the explicit construction.
@@ -465,7 +465,7 @@ int Compilation::performJobsImpl() { | |||
DriverTimers.insert({ | |||
BeganCmd, | |||
std::unique_ptr<llvm::Timer>( | |||
new llvm::Timer(OS.str(), DriverTimerGroup)) | |||
new llvm::Timer("task", OS.str(), DriverTimerGroup)) |
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 don't know what this code is about, but having a fixed name but a variable description seems odd.
I included this in the latest master-next merge. |
Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.
Resolves SR-NNNN.
Groups are required for Timers after SVN r286524. SVN r287369 requires that
timers have short names and long descriptions. Adjust the API usage
accordingly. Reorder some words to make some more sense as a description.