chore: add a TRACE call for crash_reporter::Start() (#34268)

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
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>
This commit is contained in:
Darshan Sen 2022-05-23 21:08:03 +05:30 committed by GitHub
parent 09a80ea48c
commit df9383cb3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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"
@ -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;