Skip to content

Commit

Permalink
chore: add a TRACE call for crash_reporter::Start() (#34324)
Browse files Browse the repository at this point in the history
chore: add a TRACE call for crash_reporter::Start()

Initializing the crashReporter takes around 620 milliseconds on Intel
macOS. I have sent a CL to crashpad to partially fix the performance
issue in
https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3641386.
It would be beneficial to log the performance impact of this function in
the traces in case this slows down in the future.

Signed-off-by: Darshan Sen <raisinten@gmail.com>

Co-authored-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
trop[bot] and RaisinTen committed May 24, 2022
1 parent 9bb03e9 commit 7529094
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions shell/browser/api/electron_api_crash_reporter.cc
Expand Up @@ -16,6 +16,7 @@
#include "base/path_service.h"
#include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "base/trace_event/trace_event.h"
#include "chrome/common/chrome_paths.h"
#include "components/upload_list/crash_upload_list.h"
#include "components/upload_list/text_log_upload_list.h"
Expand Down Expand Up @@ -135,6 +136,7 @@ void Start(const std::string& submit_url,
const std::map<std::string, std::string>& global_extra,
const std::map<std::string, std::string>& extra,
bool is_node_process) {
TRACE_EVENT0("electron", "crash_reporter::Start");
#if !defined(MAS_BUILD)
if (g_crash_reporter_initialized)
return;
Expand Down

0 comments on commit 7529094

Please sign in to comment.