diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-05-30 12:14:09 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2007-05-30 12:14:09 +0000 |
commit | 90e050e5982a5cddc3d544d103eccc06be42f184 (patch) | |
tree | 86e0df90d05449470ce48c0389940f6d7bb8eb6a /src/processor | |
parent | Issue 184 - MinidumpModule::code_identifier doesn't handle MD_OS_LINUX. r=mento (diff) | |
download | breakpad-90e050e5982a5cddc3d544d103eccc06be42f184.tar.xz |
Issue 143 - MinidumpProcessor should extract number of processors. r=mento
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@180 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/processor')
-rw-r--r-- | src/processor/minidump_processor.cc | 2 | ||||
-rw-r--r-- | src/processor/minidump_stackwalk.cc | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/processor/minidump_processor.cc b/src/processor/minidump_processor.cc index 6ab8c07d..9b426d53 100644 --- a/src/processor/minidump_processor.cc +++ b/src/processor/minidump_processor.cc @@ -290,6 +290,8 @@ bool MinidumpProcessor::GetCPUInfo(Minidump *dump, SystemInfo *info) { } } + info->cpu_count = raw_system_info->number_of_processors; + return true; } diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc index 299dd0e7..01b601c7 100644 --- a/src/processor/minidump_stackwalk.cc +++ b/src/processor/minidump_stackwalk.cc @@ -300,6 +300,9 @@ static void PrintProcessState(const ProcessState& process_state) { // This field is optional. printf(" %s\n", cpu_info.c_str()); } + printf(" %d CPU%s\n", + process_state.system_info()->cpu_count, + process_state.system_info()->cpu_count != 1 ? "s" : ""); printf("\n"); // Print crash information. @@ -339,16 +342,18 @@ static void PrintProcessStateMachineReadable(const ProcessState& process_state) { // Print OS and CPU information. // OS|{OS Name}|{OS Version} - // CPU|{CPU Name}|{CPU Info} + // CPU|{CPU Name}|{CPU Info}|{Number of CPUs} printf("OS%c%s%c%s\n", kOutputSeparator, StripSeparator(process_state.system_info()->os).c_str(), kOutputSeparator, StripSeparator(process_state.system_info()->os_version).c_str()); - printf("CPU%c%s%c%s\n", kOutputSeparator, + printf("CPU%c%s%c%s%c%d\n", kOutputSeparator, StripSeparator(process_state.system_info()->cpu).c_str(), kOutputSeparator, // this may be empty - StripSeparator(process_state.system_info()->cpu_info).c_str()); + StripSeparator(process_state.system_info()->cpu_info).c_str(), + kOutputSeparator, + process_state.system_info()->cpu_count); int requesting_thread = process_state.requesting_thread(); |