New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 653795 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Last visit > 30 days ago
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Support Android framework trace in ARC from chrome://tracing

Project Member Reported by shunhsingou@chromium.org, Oct 7 2016

Issue description

For Chrome OS running ARC container, we want to also collect tracing result when using chrome://tracing. This also enables the framework level tracing when Chrome OS is NOT in dev-mode, where adb and shell is not available.

This can be achieved by:
1. bind mount /sys/kernel/debug/tracing/trace_marker into the container, so the trace markers can be written.
2. Create a mojo interface for host to trigger tracing in the container.
3. Read the trace result from /sys/kernel/debug/tracing/trace in the host side.

The corresponding issue in Android: https://b.corp.google.com/issues/29776474
 
Project Member

Comment 1 by bugdroid1@chromium.org, Mar 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0b110db84a13d9087ddf55b5e99d961e54f55e16

commit 0b110db84a13d9087ddf55b5e99d961e54f55e16
Author: shunhsingou <shunhsingou@chromium.org>
Date: Wed Mar 15 03:59:11 2017

arc: enable Android tracing from chrome://tracing in dev mode

To enable tracing from chrome://tracing, we create a Mojo interface
for host side to trigger tracing in Android.

The trace is written into debugfs/tracefs in dev-mode, and is read back
by debugd.

Related changes:
- http://crrev.com/2699833003
- http://ag/1915548

BUG=653795
TEST=Run chrome://tracing and see events from Android.

Review-Url: https://codereview.chromium.org/2699833003
Cr-Commit-Position: refs/heads/master@{#456985}

[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/chrome/browser/chromeos/arc/arc_service_launcher.cc
[add] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/chrome/browser/chromeos/arc/tracing/DEPS
[add] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc
[add] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.h
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/components/arc/BUILD.gn
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/components/arc/arc_bridge_host_impl.cc
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/components/arc/arc_bridge_host_impl.h
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/components/arc/arc_bridge_service.h
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/components/arc/common/arc_bridge.mojom
[add] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/components/arc/common/tracing.mojom
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/content/browser/BUILD.gn
[add] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/content/browser/tracing/arc_tracing_agent.cc
[add] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/content/browser/tracing/arc_tracing_agent.h
[modify] https://crrev.com/0b110db84a13d9087ddf55b5e99d961e54f55e16/content/browser/tracing/tracing_controller_impl.cc

Project Member

Comment 2 by bugdroid1@chromium.org, Mar 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5b91c606652e6b648fc229a05573996510ef57ba

commit 5b91c606652e6b648fc229a05573996510ef57ba
Author: tzik <tzik@chromium.org>
Date: Wed Mar 15 05:16:08 2017

Revert of arc: enable Android tracing from chrome://tracing in dev mode (patchset #17 id:310001 of https://codereview.chromium.org/2699833003/ )

Reason for revert:
This CL seems to cause a compile failure on the CI.
The error log is:
https://luci-logdog.appspot.com/v/?s=chromium%2Fbb%2Fchromium.chromiumos%2FLinux_ChromiumOS_Builder__dbg_%2F84546%2F%2B%2Frecipes%2Fsteps%2Fcompile%2F0%2Fstdout

[10030/10041] LINK ./chrome_app_unittests
FAILED: chrome_app_unittests
(snip)
../../chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc:35: error: undefined reference to 'content::ArcTracingAgent::GetInstance()'
../../chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc:39: error: undefined reference to 'content::ArcTracingAgent::GetInstance()'
../../chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc:41: error: undefined reference to 'content::ArcTracingAgent::Delegate::~Delegate()'
../../content/browser/tracing/arc_tracing_agent.h:21: error: undefined reference to 'vtable for content::ArcTracingAgent::Delegate'
../../third_party/binutils/Linux_x64/Release/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Original issue's description:
> arc: enable Android tracing from chrome://tracing in dev mode
>
> To enable tracing from chrome://tracing, we create a Mojo interface
> for host side to trigger tracing in Android.
>
> The trace is written into debugfs/tracefs in dev-mode, and is read back
> by debugd.
>
> Related changes:
> - http://crrev.com/2699833003
> - http://ag/1915548
>
> BUG=653795
> TEST=Run chrome://tracing and see events from Android.
>
> Review-Url: https://codereview.chromium.org/2699833003
> Cr-Commit-Position: refs/heads/master@{#456985}
> Committed: https://chromium.googlesource.com/chromium/src/+/0b110db84a13d9087ddf55b5e99d961e54f55e16

TBR=yusukes@chromium.org,lhchavez@chromium.org,bccheng@chromium.org,reveman@chromium.org,shunhsingou@google.com,dsinclair@chromium.org,dcheng@chromium.org,derat@chromium.org,primiano@chromium.org,oysteine@chromium.org,alexmos@chromium.org,shunhsingou@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=653795

Review-Url: https://codereview.chromium.org/2747363002
Cr-Commit-Position: refs/heads/master@{#456999}

[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/chrome/browser/chromeos/arc/arc_service_launcher.cc
[delete] https://crrev.com/ff92bdcc0bed8878b0989f14993b3aec98a4769b/chrome/browser/chromeos/arc/tracing/DEPS
[delete] https://crrev.com/ff92bdcc0bed8878b0989f14993b3aec98a4769b/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc
[delete] https://crrev.com/ff92bdcc0bed8878b0989f14993b3aec98a4769b/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.h
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/components/arc/BUILD.gn
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/components/arc/arc_bridge_host_impl.cc
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/components/arc/arc_bridge_host_impl.h
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/components/arc/arc_bridge_service.h
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/components/arc/common/arc_bridge.mojom
[delete] https://crrev.com/ff92bdcc0bed8878b0989f14993b3aec98a4769b/components/arc/common/tracing.mojom
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/content/browser/BUILD.gn
[delete] https://crrev.com/ff92bdcc0bed8878b0989f14993b3aec98a4769b/content/browser/tracing/arc_tracing_agent.cc
[delete] https://crrev.com/ff92bdcc0bed8878b0989f14993b3aec98a4769b/content/browser/tracing/arc_tracing_agent.h
[modify] https://crrev.com/5b91c606652e6b648fc229a05573996510ef57ba/content/browser/tracing/tracing_controller_impl.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/da5f02c7b36a38453775a3b611f7c2f35934ce67

commit da5f02c7b36a38453775a3b611f7c2f35934ce67
Author: shunhsingou <shunhsingou@chromium.org>
Date: Thu Mar 16 07:44:28 2017

arc: enable Android tracing from chrome://tracing in dev mode

To enable tracing from chrome://tracing, we create a Mojo interface
for host side to trigger tracing in Android.

The trace is written into debugfs/tracefs in dev-mode, and is read back
by debugd.

Related changes:
- http://crrev.com/2749283003
- http://ag/1915548

BUG=653795
TEST=Run chrome://tracing and see events from Android.

Review-Url: https://codereview.chromium.org/2749283003
Cr-Commit-Position: refs/heads/master@{#457368}

[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/chrome/browser/chromeos/BUILD.gn
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/chrome/browser/chromeos/arc/arc_service_launcher.cc
[add] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/chrome/browser/chromeos/arc/tracing/DEPS
[add] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc
[add] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.h
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/components/arc/BUILD.gn
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/components/arc/arc_bridge_host_impl.cc
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/components/arc/arc_bridge_host_impl.h
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/components/arc/arc_bridge_service.h
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/components/arc/common/arc_bridge.mojom
[add] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/components/arc/common/tracing.mojom
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/content/browser/BUILD.gn
[add] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/content/browser/tracing/arc_tracing_agent.cc
[add] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/content/browser/tracing/arc_tracing_agent.h
[modify] https://crrev.com/da5f02c7b36a38453775a3b611f7c2f35934ce67/content/browser/tracing/tracing_controller_impl.cc

Now this is enabled in M59 9391.0.0 with dev-mode.
Project Member

Comment 5 by bugdroid1@chromium.org, May 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7092984694bd56fc05488582a93a0fda0c8d7f29

commit 7092984694bd56fc05488582a93a0fda0c8d7f29
Author: shunhsingou <shunhsingou@chromium.org>
Date: Mon May 01 10:42:05 2017

arc: enable Android tracing in verified-boot mode

In verified-boot mode, ftrace trace_marker is not allowed for writting
due to security concern. As an altenative, we use a socket for processes in
Android to write trace events, and send back the trace data via Mojo
handle.

All change set includes:
- http://crrev.com/2400163003 (Chromium)
- http://ag/2028075 (Android system/core)
- http://ag/1738271 (Android device/google/cheets2)

BUG=653795
TEST=Run chrome://tracing and see events from Android.

Review-Url: https://codereview.chromium.org/2400163003
Cr-Commit-Position: refs/heads/master@{#468306}

[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.cc
[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/chrome/browser/chromeos/arc/tracing/arc_tracing_bridge.h
[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/components/arc/common/tracing.mojom
[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/content/browser/BUILD.gn
[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/content/browser/tracing/arc_tracing_agent.cc
[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/content/browser/tracing/arc_tracing_agent.h
[modify] https://crrev.com/7092984694bd56fc05488582a93a0fda0c8d7f29/content/browser/tracing/tracing_controller_impl.cc

Sign in to add a comment