Skip to content

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

Closed
wants to merge 1 commit into from

Conversation

compnerd
Copy link
Member

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.

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.
@compnerd
Copy link
Member Author

@swift-ci please smoke test and merge

@bob-wilson
Copy link
Contributor

Something went wrong with those tests. Let's try again.

@swift-ci please smoke test and merge

@bob-wilson
Copy link
Contributor

I guess this has to go in along with the corresponding LLVM changes. I'll just include it in the next merge.

@CodaFi
Copy link
Contributor

CodaFi commented Dec 1, 2016

apple/swift-llvm#35

@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"),
Copy link

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).

Copy link
Contributor

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(…)?

Copy link

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...

Copy link
Member Author

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))
Copy link

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.

@bob-wilson
Copy link
Contributor

I included this in the latest master-next merge.

@bob-wilson bob-wilson closed this Dec 6, 2016
@compnerd compnerd deleted the timers branch September 28, 2017 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants