Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(335)

Issue 2714002: dump_syms: use unordered_set<> instead of set<> for speed.

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 10 months ago by uekawa
Modified:
9 years, 9 months ago
Reviewers:
Mark Mentovai, earthdok
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/src/
Visibility:
Public.

Description

dump_syms: use unordered_set<> instead of set<> for speed.

dump_syms spends a lot of time trying to compare strings.
This change speeds up processing of libwebviewchromium.so by 30% on my linux
machine.

Patch Set 1 #

Total comments: 2

Patch Set 2 : include order #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
M src/common/dwarf_cu_to_module.cc View 1 4 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 6
uekawa
Hi, I don't know if C++11 features are allowed in breakpad yet, but this set<string> ...
9 years, 10 months ago #1
Mark Mentovai
tr1 isn’t necessarily available under that name in C++11, you would just #include <unordered_set> and ...
9 years, 10 months ago #2
uekawa
This is my first patch to breakpad that I don't know how things really work. ...
9 years, 10 months ago #3
Mark Mentovai
LGTM and checked in as Breakpad r1341. Breakpad doesn’t have dedicated “try” or buildbot infrastructure. ...
9 years, 10 months ago #4
uekawa
On 2014/06/26 12:41:29, Mark Mentovai wrote: > LGTM and checked in as Breakpad r1341. > ...
9 years, 10 months ago #5
earthdok
9 years, 9 months ago #6
On 2014/06/25 13:24:28, Mark Mentovai wrote:
> tr1 isn’t necessarily available under that name in C++11, you would just
> #include <unordered_set> and use std::unordered_set in that case. I’m afraid
> that there’s no clean way to write this that works with both C++11 and
pre-C++11
> TR1.
> 
> However, on the Mac, although we build with C++11 language support, we don’t
> build with the C++11 library. And on Linux, when C++11 is in use, the standard
> library continues to provide <tr1/unordered_set>.

We actually use libc++ on Linux as well. The rationale is that tools like ASan
benefit from instrumenting not just user code but the C++ standard library as
well, which means rebuilding it from source. Libc++ is easier to build than
libstdc++ (and also has better support for some ASan features).

I'll send a patch to fix this, but as discussed at
https://code.google.com/p/chromium/issues/detail?id=391792 we should avoid
including tr1 where possible.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 1004:630ec63f810e-tainted