Merge "Revert "Update trace args to file_path in documentation""
diff --git a/python/perfetto/trace_processor/metrics.descriptor b/python/perfetto/trace_processor/metrics.descriptor
index 059acd2..a91d7a9 100644
--- a/python/perfetto/trace_processor/metrics.descriptor
+++ b/python/perfetto/trace_processor/metrics.descriptor
Binary files differ
diff --git a/src/profiling/common/producer_support.cc b/src/profiling/common/producer_support.cc
index df8316b..482f42f 100644
--- a/src/profiling/common/producer_support.cc
+++ b/src/profiling/common/producer_support.cc
@@ -53,10 +53,12 @@
const std::string& build_type,
const std::string& packages_list_path) {
// These are replicated constants from libcutils android_filesystem_config.h
- constexpr auto kAidAppStart = 10000; // AID_APP_START
- constexpr auto kAidAppEnd = 19999; // AID_APP_END
- constexpr auto kAidUserOffset = 100000; // AID_USER_OFFSET
- constexpr auto kAidSystem = 1000; // AID_SYSTEM
+ constexpr auto kAidAppStart = 10000; // AID_APP_START
+ constexpr auto kAidAppEnd = 19999; // AID_APP_END
+ constexpr auto kAidUserOffset = 100000; // AID_USER_OFFSET
+ constexpr auto kAidSystem = 1000; // AID_SYSTEM
+ constexpr auto kAidSdkSandboxStart = 20000; // AID_SDK_SANDBOX_PROCESS_START
+ constexpr auto kAidSdkSandboxEnd = 29999; // AID_SDK_SANDBOX_PROCESS_END
if (!build_type.empty() && build_type != "user") {
return true;
@@ -69,11 +71,22 @@
}
uint64_t uid_without_profile = uid % kAidUserOffset;
- if (uid_without_profile < kAidAppStart || kAidAppEnd < uid_without_profile) {
+ uint64_t uid_for_lookup = 0;
+
+ if (uid_without_profile >= kAidAppStart &&
+ uid_without_profile <= kAidAppEnd) {
+ uid_for_lookup = uid_without_profile;
+ } else if (uid_without_profile >= kAidSdkSandboxStart &&
+ uid_without_profile <= kAidSdkSandboxEnd) {
+ // Map SDK sandbox process to corresponding app
+ uint64_t sdk_sandbox_offset = kAidSdkSandboxStart - kAidAppStart;
+ uid_for_lookup = uid_without_profile - sdk_sandbox_offset;
+ } else {
// TODO(fmayer): relax this.
return false; // no native services on user.
}
+
std::string content;
if (!base::ReadFile(packages_list_path, &content)) {
PERFETTO_ELOG("Failed to read %s.", packages_list_path.c_str());
@@ -85,7 +98,7 @@
PERFETTO_ELOG("Failed to parse packages.list.");
return false;
}
- if (pkg.uid != uid_without_profile)
+ if (pkg.uid != uid_for_lookup)
continue;
if (!installed_by.empty()) {
if (pkg.installed_by.empty()) {
diff --git a/src/profiling/common/producer_support_unittest.cc b/src/profiling/common/producer_support_unittest.cc
index 33fdf28..cacd505 100644
--- a/src/profiling/common/producer_support_unittest.cc
+++ b/src/profiling/common/producer_support_unittest.cc
@@ -169,6 +169,42 @@
"user", tmp.path()));
}
+TEST(CanProfileAndroidTest, UserProfileableAppSdkSandbox) {
+ DataSourceConfig ds_config;
+ ds_config.set_enable_extra_guardrails(false);
+ auto tmp = base::TempFile::Create();
+ constexpr char content[] =
+ "invalid.example.profileable 10001 0 "
+ "/data/user/0/invalid.example.profileable default:targetSdkVersion=10000 "
+ "none 1 1\n";
+ base::WriteAll(tmp.fd(), content, sizeof(content));
+ EXPECT_TRUE(CanProfileAndroid(ds_config, 20001, {}, "user", tmp.path()));
+}
+
+TEST(CanProfileAndroidTest, UserNonProfileableAppSdkSandbox) {
+ DataSourceConfig ds_config;
+ ds_config.set_enable_extra_guardrails(false);
+ auto tmp = base::TempFile::Create();
+ constexpr char content[] =
+ "invalid.example.profileable 10001 0 "
+ "/data/user/0/invalid.example.profileable default:targetSdkVersion=10000 "
+ "none 0 1\n";
+ base::WriteAll(tmp.fd(), content, sizeof(content));
+ EXPECT_FALSE(CanProfileAndroid(ds_config, 20001, {}, "user", tmp.path()));
+}
+
+TEST(CanProfileAndroidTest, UserDebuggableAppSdkSandbox) {
+ DataSourceConfig ds_config;
+ ds_config.set_enable_extra_guardrails(false);
+ auto tmp = base::TempFile::Create();
+ constexpr char content[] =
+ "invalid.example.profileable 10001 1 "
+ "/data/user/0/invalid.example.profileable default:targetSdkVersion=10000 "
+ "none 0 1\n";
+ base::WriteAll(tmp.fd(), content, sizeof(content));
+ EXPECT_TRUE(CanProfileAndroid(ds_config, 20001, {}, "user", tmp.path()));
+}
+
} // namespace
} // namespace profiling
} // namespace perfetto
diff --git a/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256 b/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256
index 22e7514..729dfb4 100644
--- a/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_rendering_desktop_expand_browser_proc.png.sha256
@@ -1 +1 @@
-234eaa9915ea12f3acf5e41206cc7de79e7c1fc6781b69a2c7050c70015098ee
\ No newline at end of file
+6699299b62ee4632f851f555703c94b541de0fb9a2792262bd428c49ec3a321c
\ No newline at end of file
diff --git a/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256 b/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
index f0ab323..9ed6aa2 100644
--- a/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
+++ b/test/data/ui-screenshots/ui-chrome_rendering_desktop_select_slice_with_flows.png.sha256
@@ -1 +1 @@
-bc8fec10f063913f573a4c9a677df01956e5e902f6d6a0fdc0debaf0b2003158
\ No newline at end of file
+404f4b826297b80b5d4c67c3326bf7b044b297114247d912114efae308f99370
\ No newline at end of file
diff --git a/ui/src/assets/common.scss b/ui/src/assets/common.scss
index 86c0ccb..46f9db4 100644
--- a/ui/src/assets/common.scss
+++ b/ui/src/assets/common.scss
@@ -657,7 +657,11 @@
}
}
.track-content {
- @include track_shell_title();
+ display: grid;
+ span {
+ @include track_shell_title();
+ align-self: center;
+ }
}
}
diff --git a/ui/src/frontend/track_group_panel.ts b/ui/src/frontend/track_group_panel.ts
index 7f0b4e9..e078a55 100644
--- a/ui/src/frontend/track_group_panel.ts
+++ b/ui/src/frontend/track_group_panel.ts
@@ -106,10 +106,10 @@
}
}
- let child = '';
+ let child = null;
if (this.summaryTrackState.labels &&
this.summaryTrackState.labels.length > 0) {
- child = this.summaryTrackState.labels.join(', ');
+ child = m('span', this.summaryTrackState.labels.join(', '));
}
return m(