From: Lizhi Fan Date: Tue, 20 Aug 2024 03:41:22 +0000 (+0800) Subject: [VD] Correct the file format for startup tracing X-Git-Tag: submit/tizen/20240915.160017~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aaa4a11a9b0677b61a46b1b45f8c0e478ee9670b;p=platform%2Fframework%2Fweb%2Fchromium-efl.git [VD] Correct the file format for startup tracing Startup tracing usage: 1. Copy trace.config to /tmp of TV 2. Run the web browser or app: /usr/apps/org.tizen.chromium-efl/bin/ubrowser --trace-config-file=/tmp/trace.config 3. Find the tracing result in /tmp/trace.json Ref doc: https://chromium.googlesource.com/chromium/src/+/lkgr/docs/memory-infra/memory_infra_startup_tracing.md For WebBrowser chromium may be not able to access /tmp/trace.config, you could put it into /opt/usr/apps/org.tizen.browser directory. Sometimes WebBrowser can't write tracing result to /tmp, you may find this log: [ERROR:startup_tracing_controller.cc: Finalise(270)] Cannot move file '/tmp/.org.chromium.Chromium.0RRXgP' to '/tmp/trace.json' : FILE_ERROR_ACCESS_DENIED In this case, '/tmp/.org.chromium.Chromium.0RRXgP' has the correct tracing result inside. Change-Id: I477be3a6590d61629a510d18ce69e70cf75174bd Signed-off-by: Lizhi Fan --- diff --git a/components/tracing/common/trace.config b/components/tracing/common/trace.config new file mode 100644 index 000000000000..0143691d008b --- /dev/null +++ b/components/tracing/common/trace.config @@ -0,0 +1,14 @@ +{ + "startup_duration": 4, + "result_file": "/tmp/trace.json", + "trace_config": { + "included_categories": ["benchmark,blink,toplevel,startup,cc,toplevel.flow,disabled-by-default-memory-infra"], + "excluded_categories": ["*"], + "memory_dump_config": { + "triggers": [ + { "mode": "light", "periodic_interval_ms": 50 }, + { "mode": "detailed", "periodic_interval_ms": 1000 } + ] + } + } +} diff --git a/components/tracing/common/trace_startup_config.h b/components/tracing/common/trace_startup_config.h index 988c137c1356..a033397c6e3c 100644 --- a/components/tracing/common/trace_startup_config.h +++ b/components/tracing/common/trace_startup_config.h @@ -168,7 +168,11 @@ class TRACING_EXPORT TraceStartupConfig { base::FilePath result_file_; SessionOwner session_owner_ = SessionOwner::kTracingController; bool session_adopted_ = false; +#if BUILDFLAG(IS_TIZEN_TV) + OutputFormat output_format_ = OutputFormat::kLegacyJSON; +#else OutputFormat output_format_ = OutputFormat::kProto; +#endif }; } // namespace tracing