diff options
author | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-09 17:53:01 +0000 |
---|---|---|
committer | jbates@chromium.org <jbates@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-09 17:53:01 +0000 |
commit | 317e270b12e2a325127293d1c8e4797ed5fdfd64 (patch) | |
tree | 85ae0fe3452f32af30ababfbba1fb42b694df133 /chrome/common/child_process_logging_linux.cc | |
parent | 6d6afe837ea1230508731c530fb47c262b8aaecb (diff) | |
download | chromium_src-317e270b12e2a325127293d1c8e4797ed5fdfd64.zip chromium_src-317e270b12e2a325127293d1c8e4797ed5fdfd64.tar.gz chromium_src-317e270b12e2a325127293d1c8e4797ed5fdfd64.tar.bz2 |
linux crash dump now includes gpu data
BUG=71852
TEST=
Review URL: http://codereview.chromium.org/6580055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/child_process_logging_linux.cc')
-rw-r--r-- | chrome/common/child_process_logging_linux.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/chrome/common/child_process_logging_linux.cc b/chrome/common/child_process_logging_linux.cc index e81fcc3..400a8fe 100644 --- a/chrome/common/child_process_logging_linux.cc +++ b/chrome/common/child_process_logging_linux.cc @@ -4,6 +4,7 @@ #include "chrome/common/child_process_logging.h" +#include "base/string_number_conversions.h" #include "base/string_util.h" #include "base/utf_string_conversions.h" #include "chrome/common/gpu_info.h" @@ -22,6 +23,14 @@ static const size_t kClientIdSize = 32 + 1; char g_active_url[kMaxActiveURLSize]; char g_client_id[kClientIdSize]; +static const size_t kGpuStringSize = 32; + +char g_gpu_vendor_id[kGpuStringSize] = ""; +char g_gpu_device_id[kGpuStringSize] = ""; +char g_gpu_driver_ver[kGpuStringSize] = ""; +char g_gpu_ps_ver[kGpuStringSize] = ""; +char g_gpu_vs_ver[kGpuStringSize] = ""; + void SetActiveURL(const GURL& url) { base::strlcpy(g_active_url, url.possibly_invalid_spec().c_str(), @@ -49,7 +58,17 @@ void SetActiveExtensions(const std::set<std::string>& extension_ids) { } void SetGpuInfo(const GPUInfo& gpu_info) { - // TODO(rlp): Bug 38737. + snprintf(g_gpu_vendor_id, kGpuStringSize, "0x%04x", gpu_info.vendor_id); + snprintf(g_gpu_device_id, kGpuStringSize, "0x%04x", gpu_info.device_id); + strncpy(g_gpu_driver_ver, + gpu_info.driver_version.c_str(), + kGpuStringSize); + strncpy(g_gpu_ps_ver, + base::UintToString(gpu_info.pixel_shader_version).c_str(), + kGpuStringSize); + strncpy(g_gpu_vs_ver, + base::UintToString(gpu_info.vertex_shader_version).c_str(), + kGpuStringSize); } void SetNumberOfViews(int number_of_views) { |