This is an archive of the discontinued LLVM Phabricator instance.

[lld-macho] Add more TimeTraceScopes
ClosedPublic

Authored by int3 on Mar 24 2021, 5:43 PM.

Details

Reviewers
oontvoo
Group Reviewers
Restricted Project
Commits
rG4bcaafeb0e82: [lld-macho] Add more TimeTraceScopes
Summary

I added just enough to allow us to see a top-level breakdown of time taken. This
is the result of loading the time-trace output into chrome:://tracing:

https://gist.githubusercontent.com/int3/236c723cbb4b6fa3b2d340bb6395c797/raw/ef5e8234f3fdf609bf93b50f54f4e0d9bd439403/tracing.png

Diff Detail

Event Timeline

int3 created this revision.Mar 24 2021, 5:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2021, 5:43 PM
int3 requested review of this revision.Mar 24 2021, 5:43 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 24 2021, 5:43 PM
int3 edited the summary of this revision. (Show Details)Mar 24 2021, 5:43 PM
int3 added inline comments.
lld/MachO/Driver.cpp
1069–1080

It's kind of silly that this takes a non-trivial amount of time. Perhaps that's where a chunk of the speedup in D98837 is coming from. Maybe once that lands we can remove this TimeTraceScope block.

cc @alexshap

oontvoo added inline comments.
lld/MachO/Driver.cpp
994–995

Do you want to move these two into the createFiles() too?

lld/MachO/Writer.cpp
946–947

Could this be moved to cover the whole function? I see the finalize*() functions have their own time-sccopes. Similarly, the write*() have theirs too.
So it doesn't seem consistent to have this "over-all" scope cover only half of this function 🤔

int3 updated this revision to Diff 333354.Mar 25 2021, 10:57 AM
int3 marked an inline comment as done.

address comments

int3 marked an inline comment as done.Mar 25 2021, 10:58 AM
oontvoo accepted this revision as: oontvoo.Mar 25 2021, 11:07 AM

The detailed graph looks nice! Thanks!

This revision is now accepted and ready to land.Mar 25 2021, 11:07 AM
This revision was automatically updated to reflect the committed changes.