Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(60)

Side by Side Diff: kernel_collector.cc

Issue 3820004: crash-reporter: send payload sizes to help diagnose corruption (Closed) Base URL: http://git.chromium.org/git/crash-reporter.git
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « crash_sender ('k') | user_collector.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "crash-reporter/kernel_collector.h" 5 #include "crash-reporter/kernel_collector.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "crash-reporter/system_logging.h" 10 #include "crash-reporter/system_logging.h"
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 kernel_dump.length()) != 97 kernel_dump.length()) !=
98 static_cast<int>(kernel_dump.length())) { 98 static_cast<int>(kernel_dump.length())) {
99 logger_->LogInfo("Failed to write kernel dump to %s", 99 logger_->LogInfo("Failed to write kernel dump to %s",
100 kernel_crash_path.value().c_str()); 100 kernel_crash_path.value().c_str());
101 return true; 101 return true;
102 } 102 }
103 103
104 WriteCrashMetaData( 104 WriteCrashMetaData(
105 root_crash_directory.Append( 105 root_crash_directory.Append(
106 StringPrintf("%s.meta", dump_basename.c_str())), 106 StringPrintf("%s.meta", dump_basename.c_str())),
107 kKernelExecName); 107 kKernelExecName,
108 kernel_crash_path.value());
108 109
109 logger_->LogInfo("Collected kernel crash diagnostics into %s", 110 logger_->LogInfo("Collected kernel crash diagnostics into %s",
110 kernel_crash_path.value().c_str()); 111 kernel_crash_path.value().c_str());
111 } else { 112 } else {
112 logger_->LogInfo("Crash not saved since metrics disabled"); 113 logger_->LogInfo("Crash not saved since metrics disabled");
113 } 114 }
114 if (!ClearPreservedDump()) { 115 if (!ClearPreservedDump()) {
115 return false; 116 return false;
116 } 117 }
117 118
118 return true; 119 return true;
119 } 120 }
OLDNEW
« no previous file with comments | « crash_sender ('k') | user_collector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698