diff options
author | Ryan Savitski <rsavitski@google.com> | 2022-07-04 14:19:38 +0100 |
---|---|---|
committer | Ryan Savitski <rsavitski@google.com> | 2022-07-06 13:25:04 +0000 |
commit | 257fdf188feca28efa65daf33d5f7b171ec32ac3 (patch) | |
tree | e452a0715a179a89ff350983509d755af4920f8d | |
parent | 1ab43b2d4bfdd1dc6c0865e92e6b1ce0016d9fa8 (diff) | |
download | perfetto-257fdf188feca28efa65daf33d5f7b171ec32ac3.tar.gz |
Revert "perfetto: Allow to profile system server on user"
This reverts commit b1e4afee320e83a044a4953963a1111afb0c8149.
Revert accompanying the selinux revert in r.android.com/2142152.
Context in bug.
Bug: 217368496
Tested: redfin-user and barbet-userdebug: build+flash+boot;
manual test of typical profiling (heap and perf);
atest CtsPerfettoTestCases.
Change-Id: Ia5e3a79df64e6d84595c054050ddb87406d7e388
Merged-In: Ia5e3a79df64e6d84595c054050ddb87406d7e388
(cherry picked from commit 8b44f9934d609ce8beb5305c03791329d1f461c6)
-rw-r--r-- | src/profiling/common/producer_support.cc | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/profiling/common/producer_support.cc b/src/profiling/common/producer_support.cc index 544d3c5a2..8ab0b42a6 100644 --- a/src/profiling/common/producer_support.cc +++ b/src/profiling/common/producer_support.cc @@ -98,25 +98,18 @@ bool CanProfileAndroid(const DataSourceConfig& ds_config, const std::string& packages_list_path) { // These constants are replicated from libcutils android_filesystem_config.h, // to allow for building and testing the profilers outside the android tree. - constexpr auto kAidSystem = 1000; // AID_SYSTEM - constexpr auto kAidUserOffset = 100000; // AID_USER_OFFSET - constexpr auto kAidAppStart = 10000; // AID_APP_START - constexpr auto kAidAppEnd = 19999; // AID_APP_END - constexpr auto kAidSdkSandboxStart = 20000; // AID_SDK_SANDBOX_PROCESS_START - constexpr auto kAidSdkSandboxEnd = 29999; // AID_SDK_SANDBOX_PROCESS_END - constexpr auto kAidIsolatedStart = 90000; // AID_ISOLATED_START - constexpr auto kAidIsolatedEnd = 99999; // AID_ISOLATED_END + constexpr auto kAidUserOffset = 100000; // AID_USER_OFFSET + constexpr auto kAidAppStart = 10000; // AID_APP_START + constexpr auto kAidAppEnd = 19999; // AID_APP_END + constexpr auto kAidSdkSandboxStart = 20000; // AID_SDK_SANDBOX_PROCESS_START + constexpr auto kAidSdkSandboxEnd = 29999; // AID_SDK_SANDBOX_PROCESS_END + constexpr auto kAidIsolatedStart = 90000; // AID_ISOLATED_START + constexpr auto kAidIsolatedEnd = 99999; // AID_ISOLATED_END if (!build_type.empty() && build_type != "user") { return true; } - // TODO(b/217368496): remove this. - if (uid == kAidSystem) { - return ds_config.session_initiator() == - DataSourceConfig::SESSION_INITIATOR_TRUSTED_SYSTEM; - } - uint64_t uid_without_profile = uid % kAidUserOffset; uint64_t uid_for_lookup = 0; if (uid_without_profile >= kAidAppStart && |