Add process type to MicroDumpExtraInfo

BUG=616774
R=primiano@chromium.org, torne@chromium.org

Review URL: https://codereview.chromium.org/2087413002 .
This commit is contained in:
Primiano Tucci 2016-07-19 17:44:10 +01:00
parent 0ebdc4a10a
commit 5adeef6117
2 changed files with 16 additions and 1 deletions

View file

@ -38,9 +38,13 @@ struct MicrodumpExtraInfo {
const char* build_fingerprint;
const char* product_info;
const char* gpu_fingerprint;
const char* process_type;
MicrodumpExtraInfo()
: build_fingerprint(NULL), product_info(NULL), gpu_fingerprint(NULL) {}
: build_fingerprint(NULL),
product_info(NULL),
gpu_fingerprint(NULL),
process_type(NULL) {}
};
}

View file

@ -164,6 +164,7 @@ class MicrodumpWriter {
LogLine("-----BEGIN BREAKPAD MICRODUMP-----");
DumpProductInformation();
DumpOSInformation();
DumpProcessType();
DumpGPUInformation();
#if !defined(__LP64__)
DumpFreeSpace();
@ -233,6 +234,16 @@ class MicrodumpWriter {
LogCommitLine();
}
void DumpProcessType() {
LogAppend("P ");
if (microdump_extra_info_.process_type) {
LogAppend(microdump_extra_info_.process_type);
} else {
LogAppend("UNKNOWN");
}
LogCommitLine();
}
void DumpOSInformation() {
const uint8_t n_cpus = static_cast<uint8_t>(sysconf(_SC_NPROCESSORS_CONF));