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

Issue 36001: Implement a network daemon + networked implementation of SymbolSupplier and SourceLineResolver (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 6 months ago by Ted Mielczarek
Modified:
10 years, 10 months ago
Reviewers:
jimb, Mark Mentovai, thakis
CC:
google-breakpad-dev_googlegroups.com
Base URL:
http://google-breakpad.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Attached is a first cut at a NetworkSourceLineServer as well as a
NetworkSourceLineResolver. The Server contains a SymbolSupplier and
SourceLineResolver, and listens for requests via UDP from clients. The
NetworkSourceLineResolver class implements both the SymbolSupplier and
SourceLineResolverInterface, proxying requests to the server via UDP. The
primary benefit here is that once the server has loaded a particular symbol
file, it can simply keep it in memory for quick access.

A simple test with a Firefox minidump + the associated symbols shows that on my
machine, the current minidump_stackwalk takes about 1.5 seconds, a first run of
minidump_stackwalk using NetworkSourceLineResolver takes about 6.5 seconds, and
following runs take about 0.35 seconds (when the server already has all symbols
in memory).

The patch needs a once-over for style and other nits, and also has three major
caveats right now:
1) No unit tests for added functionality--I'll write them before we get to
landing, I just didn't get around to it yet.
2) No way to evict loaded modules/symbol files. This means that the server will
grow in memory size until it runs out. I think fixing this won't be too hard,
just need to add a LRU cache of symbol files, then add a method to
BasicSourceLineResolver to let it remove a loaded module.
3) The server is single-threaded, which means that multiple clients hitting the
same server could cause delays, mostly when the server is forced to load symbol
files. Adding a bunch of locking doesn't sound very fun, and probably doesn't
solve the problem much anyway, since you'd just be waiting on a lock instead of
waiting on the server. I'm not sure how much of a problem this would be in
practice, it bears testing.

There's also a hack in this patch that's just for testing, I switched
minidump_stackwalk to use NetworkSourceLineResolver.

Patch Set 1 #

Patch Set 2 : Updated patch #

Total comments: 20

Patch Set 3 : Updated with mark's comments #

Patch Set 4 : Merge to tip, add CFI support #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Makefile.am View 1 2 3 15 chunks +130 lines, -7 lines 0 comments Download
configure.ac View 2 3 1 chunk +9 lines, -0 lines 0 comments Download
src/config.h.in View 2 3 1 chunk +3 lines, -0 lines 0 comments Download
src/google_breakpad/processor/basic_source_line_resolver.h View 1 2 3 2 chunks +7 lines, -6 lines 0 comments Download
src/google_breakpad/processor/network_source_line_resolver.h View 2 3 1 chunk +168 lines, -0 lines 0 comments Download
src/google_breakpad/processor/source_line_resolver_interface.h View 1 2 3 5 chunks +14 lines, -10 lines 0 comments Download
src/processor/basic_code_module.h View 1 2 3 1 chunk +15 lines, -0 lines 0 comments Download
src/processor/basic_source_line_resolver.cc View 1 2 3 23 chunks +97 lines, -164 lines 0 comments Download
src/processor/basic_source_line_resolver_unittest.cc View 1 2 3 10 chunks +60 lines, -44 lines 0 comments Download
src/processor/binarystream.cc View 2 3 1 chunk +123 lines, -0 lines 0 comments Download
src/processor/binarystream.h View 2 3 1 chunk +88 lines, -0 lines 0 comments Download
src/processor/binarystream_unittest.cc View 2 3 1 chunk +432 lines, -0 lines 0 comments Download
src/processor/cfi_frame_info.cc View 2 chunks +23 lines, -0 lines 0 comments Download
src/processor/cfi_frame_info.h View 1 chunk +4 lines, -0 lines 0 comments Download
src/processor/cfi_frame_info_unittest.cc View 5 chunks +14 lines, -0 lines 0 comments Download
src/processor/network_interface.h View 2 3 1 chunk +62 lines, -0 lines 2 comments Download
src/processor/network_source_line_protocol.h View 2 3 1 chunk +162 lines, -0 lines 1 comment Download
src/processor/network_source_line_resolver.cc View 1 2 3 1 chunk +437 lines, -0 lines 1 comment Download
src/processor/network_source_line_resolver_server_unittest.cc View 1 chunk +207 lines, -0 lines 0 comments Download
src/processor/network_source_line_resolver_unittest.cc View 2 3 1 chunk +535 lines, -0 lines 0 comments Download
src/processor/network_source_line_server.cc View 1 2 3 1 chunk +434 lines, -0 lines 4 comments Download
src/processor/network_source_line_server.h View 1 2 3 1 chunk +136 lines, -0 lines 0 comments Download
src/processor/network_source_line_server_unittest.cc View 2 3 1 chunk +954 lines, -0 lines 0 comments Download
src/processor/source_daemon.cc View 1 2 3 1 chunk +127 lines, -0 lines 0 comments Download
src/processor/stackwalker.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
src/processor/tokenize.cc View 1 2 3 1 chunk +76 lines, -0 lines 1 comment Download
src/processor/tokenize.h View 1 2 3 1 chunk +61 lines, -0 lines 0 comments Download
src/processor/udp_network.cc View 2 3 1 chunk +185 lines, -0 lines 0 comments Download
src/processor/udp_network.h View 2 3 1 chunk +73 lines, -0 lines 0 comments Download
src/processor/windows_frame_info.h View 2 3 3 chunks +68 lines, -0 lines 0 comments Download

Messages

Total messages: 15
Ted Mielczarek
14 years, 6 months ago #1
Mark Mentovai
This is a big change that I likely won't have time to review fully today. ...
14 years, 6 months ago #2
Ted Mielczarek
Yeah, sorry, this isn't actually review-ready yet, I just wanted to get it up here ...
14 years, 6 months ago #3
Ted Mielczarek
Updated patch
14 years, 1 month ago #4
Ted Mielczarek
On 2010/03/02 15:59:40, Ted Mielczarek wrote: > Updated patch Just some notes on what I ...
14 years, 1 month ago #5
Mark Mentovai
This is headed in a nice direction. It certainly will require some merge work with ...
14 years, 1 month ago #6
Ted Mielczarek
Updated with mark's comments
14 years, 1 month ago #7
Ted Mielczarek
On 2010/03/08 14:37:23, Ted Mielczarek wrote: > Updated with mark's comments Hopefully interdiff works here, ...
14 years, 1 month ago #8
Mark Mentovai
I don't really have the resources to give the entire patch another read-through now, but ...
14 years, 1 month ago #9
Ted Mielczarek
Merge to tip, add CFI support
14 years ago #10
Ted Mielczarek
On 2010/04/07 16:31:49, Ted Mielczarek wrote: > Merge to tip, add CFI support Jim, can ...
14 years ago #11
jimb
The CFIFrameInfo changes look good. Looking at the others...
14 years ago #12
jimb
Hi, Ted. The CFI-related stuff all LGreatTM. Here are some comments I had looking over ...
14 years ago #13
Ted Mielczarek
Thanks for the reviews. Anything I didn't respond to I probably just fixed. http://breakpad.appspot.com/36001/diff/16001/17016 File ...
14 years ago #14
thakis
10 years, 10 months ago #15
Message was sent while issue was closed.
https://breakpad.appspot.com/36001/diff/16001/src/processor/tokenize.cc
File src/processor/tokenize.cc (right):

https://breakpad.appspot.com/36001/diff/16001/src/processor/tokenize.cc#newco...
src/processor/tokenize.cc:60: if (!remaining > 0) {
This is supposed to read `if (remaining > 0)`, not `if (!remaining > 0)`, right?
clang's -Wlogical-not-parentheses warns about this with a recent clang, and from
looking at the code it looks like the warning is correct.
Sign in to reply to this message.

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