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

Side by Side Diff: chrome/app/breakpad_linux.h

Issue 11142010: Specify a file size limit for minidumps (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « no previous file | chrome/app/breakpad_linux.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium 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 #ifndef CHROME_APP_BREAKPAD_LINUX_H_ 5 #ifndef CHROME_APP_BREAKPAD_LINUX_H_
6 #define CHROME_APP_BREAKPAD_LINUX_H_ 6 #define CHROME_APP_BREAKPAD_LINUX_H_
7 7
8 #include <sys/types.h>
9
8 #include "base/basictypes.h" 10 #include "base/basictypes.h"
9 11
10 extern void InitCrashReporter(); 12 extern void InitCrashReporter();
11 #if defined(OS_ANDROID) 13 #if defined(OS_ANDROID)
12 extern void InitNonBrowserCrashReporterForAndroid(int minidump_fd); 14 extern void InitNonBrowserCrashReporterForAndroid(int minidump_fd);
13 #endif 15 #endif
14 bool IsCrashReporterEnabled(); 16 bool IsCrashReporterEnabled();
15 17
16 static const size_t kMaxActiveURLSize = 1024; 18 static const size_t kMaxActiveURLSize = 1024;
17 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex. 19 static const size_t kGuidSize = 32; // 128 bits = 32 chars in hex.
18 static const size_t kDistroSize = 128; 20 static const size_t kDistroSize = 128;
19 #if defined(ADDRESS_SANITIZER) 21 #if defined(ADDRESS_SANITIZER)
20 static const size_t kMaxAsanReportSize = 1 << 16; 22 static const size_t kMaxAsanReportSize = 1 << 16;
21 #endif 23 #endif
24 // Define a preferred limit on minidump sizes, because Crash Server currently
25 // throws away any larger than 1.2MB (1.2 * 1024 * 1024). A value of -1 means
26 // no limit.
27 static const off_t kMaxMinidumpFileSize = 1258291;
22 28
23 // BreakpadInfo describes a crash report. 29 // BreakpadInfo describes a crash report.
24 // The minidump information can either be contained in a file descriptor (fd) or 30 // The minidump information can either be contained in a file descriptor (fd) or
25 // in a file (whose path is in filename). 31 // in a file (whose path is in filename).
26 struct BreakpadInfo { 32 struct BreakpadInfo {
27 int fd; // File descriptor to the Breakpad dump data. 33 int fd; // File descriptor to the Breakpad dump data.
28 const char* filename; // Path to the Breakpad dump data. 34 const char* filename; // Path to the Breakpad dump data.
29 #if defined(ADDRESS_SANITIZER) 35 #if defined(ADDRESS_SANITIZER)
30 const char* log_filename; // Path to the ASan log file. 36 const char* log_filename; // Path to the ASan log file.
31 const char* asan_report_str; // ASan report. 37 const char* asan_report_str; // ASan report.
32 unsigned asan_report_length; // Length of |asan_report_length|. 38 unsigned asan_report_length; // Length of |asan_report_length|.
33 #endif 39 #endif
34 const char* process_type; // Process type, e.g. "renderer". 40 const char* process_type; // Process type, e.g. "renderer".
35 unsigned process_type_length; // Length of |process_type|. 41 unsigned process_type_length; // Length of |process_type|.
36 const char* crash_url; // Active URL in the crashing process. 42 const char* crash_url; // Active URL in the crashing process.
37 unsigned crash_url_length; // Length of |crash_url|. 43 unsigned crash_url_length; // Length of |crash_url|.
38 const char* guid; // Client ID. 44 const char* guid; // Client ID.
39 unsigned guid_length; // Length of |guid|. 45 unsigned guid_length; // Length of |guid|.
40 const char* distro; // Linux distro string. 46 const char* distro; // Linux distro string.
41 unsigned distro_length; // Length of |distro|. 47 unsigned distro_length; // Length of |distro|.
42 bool upload; // Whether to upload or save crash dump. 48 bool upload; // Whether to upload or save crash dump.
43 uint64_t process_start_time; // Uptime of the crashing process. 49 uint64_t process_start_time; // Uptime of the crashing process.
44 size_t oom_size; // Amount of memory requested if OOM. 50 size_t oom_size; // Amount of memory requested if OOM.
45 uint64_t pid; // PID where applicable. 51 uint64_t pid; // PID where applicable.
46 }; 52 };
47 53
48 extern void HandleCrashDump(const BreakpadInfo& info); 54 extern void HandleCrashDump(const BreakpadInfo& info);
49 55
50 #endif // CHROME_APP_BREAKPAD_LINUX_H_ 56 #endif // CHROME_APP_BREAKPAD_LINUX_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/app/breakpad_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698