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

Side by Side Diff: src/client/linux/handler/exception_handler.cc

Issue 1286063003: [microdump] Move microdump writes to the crash ring-buffer log (Closed) Base URL: http://google-breakpad.googlecode.com/svn/trunk
Patch Set: Nits Created 5 years, 4 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 | « no previous file | src/client/linux/log/log.h » ('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 Google Inc. 1 // Copyright (c) 2010 Google Inc.
2 // All rights reserved. 2 // All rights reserved.
3 // 3 //
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 callback_context_(callback_context), 226 callback_context_(callback_context),
227 minidump_descriptor_(descriptor), 227 minidump_descriptor_(descriptor),
228 crash_handler_(NULL) { 228 crash_handler_(NULL) {
229 if (server_fd >= 0) 229 if (server_fd >= 0)
230 crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd)); 230 crash_generation_client_.reset(CrashGenerationClient::TryCreate(server_fd));
231 231
232 if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() && 232 if (!IsOutOfProcess() && !minidump_descriptor_.IsFD() &&
233 !minidump_descriptor_.IsMicrodumpOnConsole()) 233 !minidump_descriptor_.IsMicrodumpOnConsole())
234 minidump_descriptor_.UpdatePath(); 234 minidump_descriptor_.UpdatePath();
235 235
236 #if defined(__ANDROID__)
237 if (minidump_descriptor_.IsMicrodumpOnConsole())
238 logger::initializeCrashLogWriter();
239 #endif
240
236 pthread_mutex_lock(&g_handler_stack_mutex_); 241 pthread_mutex_lock(&g_handler_stack_mutex_);
237 if (!g_handler_stack_) 242 if (!g_handler_stack_)
238 g_handler_stack_ = new std::vector<ExceptionHandler*>; 243 g_handler_stack_ = new std::vector<ExceptionHandler*>;
239 if (install_handler) { 244 if (install_handler) {
240 InstallAlternateStackLocked(); 245 InstallAlternateStackLocked();
241 InstallHandlersLocked(); 246 InstallHandlersLocked();
242 } 247 }
243 g_handler_stack_->push_back(this); 248 g_handler_stack_->push_back(this);
244 pthread_mutex_unlock(&g_handler_stack_mutex_); 249 pthread_mutex_unlock(&g_handler_stack_mutex_);
245 } 250 }
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 descriptor.UpdatePath(); 745 descriptor.UpdatePath();
741 if (!google_breakpad::WriteMinidump(descriptor.path(), 746 if (!google_breakpad::WriteMinidump(descriptor.path(),
742 child, 747 child,
743 child_blamed_thread)) 748 child_blamed_thread))
744 return false; 749 return false;
745 750
746 return callback ? callback(descriptor, callback_context, true) : true; 751 return callback ? callback(descriptor, callback_context, true) : true;
747 } 752 }
748 753
749 } // namespace google_breakpad 754 } // namespace google_breakpad
OLDNEW
« no previous file with comments | « no previous file | src/client/linux/log/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698