This is an archive of the discontinued LLVM Phabricator instance.

Improve hashing for time profiler
ClosedPublic

Authored by anton-afanasyev on Apr 8 2019, 5:58 AM.

Details

Summary

Use optimized hashing while writing time trace by join two hashes to one.
Used for -ftime-trace option.

Event Timeline

anton-afanasyev created this revision.Apr 8 2019, 5:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 8 2019, 5:58 AM

Update: lint fix

aras-p added a subscriber: aras-p.Apr 8 2019, 6:11 AM
takuto.ikuta added inline comments.Apr 8 2019, 7:16 AM
llvm/lib/Support/TimeProfiler.cpp
125

use emplace_back here?

anton-afanasyev marked 2 inline comments as done.

Updated, push_back() -> emplace_back()

llvm/lib/Support/TimeProfiler.cpp
125

Yes, thanks.

takuto.ikuta requested changes to this revision.Apr 8 2019, 6:17 PM
takuto.ikuta added inline comments.
llvm/lib/Support/TimeProfiler.cpp
151

better to include header for StringMap?

This revision now requires changes to proceed.Apr 8 2019, 6:17 PM
anton-afanasyev marked 2 inline comments as done.

Updated, added header for StringMap

llvm/lib/Support/TimeProfiler.cpp
151

Yes, thanks.

takuto.ikuta accepted this revision.Apr 8 2019, 9:15 PM

LGTM with nit.
But I hope rnk take a look.

llvm/lib/Support/TimeProfiler.cpp
137

I prefer to reuse result of lookup for map here in L139.

This revision is now accepted and ready to land.Apr 8 2019, 9:15 PM
anton-afanasyev marked 2 inline comments as done.Apr 8 2019, 10:16 PM
anton-afanasyev added inline comments.
llvm/lib/Support/TimeProfiler.cpp
137

Ok.

anton-afanasyev marked an inline comment as done.

Updated, reuse result of map lookup

LGTM with nit.
But I hope rnk take a look.

Ok, thanks. Waiting for @rnk awhile.

rnk accepted this revision.Apr 9 2019, 5:11 AM

Lgtm

I'm at eurollvm, feel free to find other reviewers in the meantime.

This revision was automatically updated to reflect the committed changes.