Closed
Bug 853851
Opened 13 years ago
Closed 13 years ago
Transition some breakpad logging to BPLOG
Categories
(Core :: Gecko Profiler, defect)
Tracking
()
RESOLVED
FIXED
mozilla22
People
(Reporter: jseward, Assigned: jseward)
Details
Attachments
(2 files, 1 obsolete file)
|
2.11 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
|
42.01 KB,
patch
|
ted
:
review+
|
Details | Diff | Splinter Review |
Transition some breakpad profiling from fprintf(stderr, ...) to BPLOG
so it works sanely for SPS running on Android. Also add a bit more
logging to src/common/linux/dump_symbols.cc.
| Assignee | ||
Updated•13 years ago
|
Assignee: nobody → jseward
| Assignee | ||
Comment 1•13 years ago
|
||
Attachment #728212 -
Flags: feedback?(ted)
| Assignee | ||
Comment 2•13 years ago
|
||
This was a stopgap fix whilst breakpad didn't have adequate logging in
dump_symbols.cc. The other patch on this bug adds that, though, and
does it better. In which case the stuff in local_debug_info_symbolizer.cc
is redundant.
Attachment #728225 -
Flags: review?(ted)
| Assignee | ||
Comment 3•13 years ago
|
||
Also moves pathname_stripper.{cc,h} and pathname_stripper_unittest.cc
from processor/ to common/, so as to work around link failures when
--disable-crashreporter is not given.
Attachment #728212 -
Attachment is obsolete: true
Attachment #728212 -
Flags: feedback?(ted)
Attachment #729021 -
Flags: review?(ted)
Comment 4•13 years ago
|
||
Comment on attachment 729021 [details] [diff] [review]
Proposed patch, take 2
Review of attachment 729021 [details] [diff] [review]:
-----------------------------------------------------------------
This looks fine to me. I'd like to get this up for upstream review just to see what Mark thinks of the idea of using the existing logging code in the symbol dumping code.
::: toolkit/crashreporter/google-breakpad/src/common/dwarf_cfi_to_module.cc
@@ +233,5 @@
> }
>
> void DwarfCFIToModule::Reporter::UnnamedRegister(size_t offset, int reg) {
> + BPLOG(INFO) << file_ << ", section '" << section_
> + << "': the call frame entry at offset 0x"
nit: you've got some trailing spaces in this file.
::: toolkit/crashreporter/google-breakpad/src/common/linux/dump_symbols.cc
@@ +528,5 @@
> typedef typename ElfClass::Addr Addr;
> typedef typename ElfClass::Phdr Phdr;
> typedef typename ElfClass::Shdr Shdr;
>
> + BPLOG(INFO) << "";
Any reason for this blank line?
::: toolkit/crashreporter/google-breakpad/src/processor/logging.cc
@@ +48,5 @@
> #ifdef _WIN32
> #define snprintf _snprintf
> #endif
>
> +#ifdef ANDROID
You want __ANDROID__ here and below.
@@ +86,5 @@
> LogStream::~LogStream() {
> +#ifdef ANDROID
> + __android_log_print(ANDROID_LOG_ERROR,
> + "Profiler", "%s", str_.str().c_str());
> +#else
I'm sure there's a smarter way of handling this, like implementing our own stringstream or ostream subclass and handling << endl to do the log print, and then changing the #defines in logging.h to use our new class, but that seems like a lot more work.
::: toolkit/crashreporter/google-breakpad/src/processor/logging.h
@@ +100,2 @@
> template<typename T> std::ostream& operator<<(const T &t) {
> + return str_ << t;
I'm not sure it matters much in practice, but would it be better to ifdef this so the behavior doesn't change on non-Android?
Attachment #729021 -
Flags: review?(ted) → review+
Updated•13 years ago
|
Attachment #728225 -
Flags: review?(ted) → review+
| Assignee | ||
Comment 5•13 years ago
|
||
Comment 6•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla22
You need to log in
before you can comment on or make changes to this bug.
Description
•