add perf dump
Bug: 240530709 Test: adb bugreport Change-Id: Ie6b4ceb9dcc9daa199927fde56d720816145f344
This commit is contained in:
parent
3cee7a2fca
commit
6965958295
18
performance/Android.bp
Normal file
18
performance/Android.bp
Normal file
@ -0,0 +1,18 @@
|
||||
package {
|
||||
default_applicable_licenses: ["Android-Apache-2.0"],
|
||||
}
|
||||
|
||||
cc_binary {
|
||||
name: "dump_perf",
|
||||
srcs: ["dump_perf.cpp"],
|
||||
cflags: [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
],
|
||||
shared_libs: [
|
||||
"libdump",
|
||||
],
|
||||
vendor: true,
|
||||
relative_install_path: "dump",
|
||||
}
|
22
performance/dump_perf.cpp
Normal file
22
performance/dump_perf.cpp
Normal file
@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright 2022 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include <dump/pixel_dump.h>
|
||||
|
||||
int main() {
|
||||
dumpFileContent("VENDOR PROC DUMP", "/proc/vendor_sched/dump_task");
|
||||
return 0;
|
||||
}
|
3
performance/perf.mk
Normal file
3
performance/perf.mk
Normal file
@ -0,0 +1,3 @@
|
||||
BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/performance/sepolicy
|
||||
|
||||
PRODUCT_PACKAGES += dump_perf
|
3
performance/sepolicy/dump_perf.te
Normal file
3
performance/sepolicy/dump_perf.te
Normal file
@ -0,0 +1,3 @@
|
||||
pixel_bugreport(dump_perf)
|
||||
|
||||
allow dump_perf proc_vendor_sched:file r_file_perms;
|
2
performance/sepolicy/file_contexts
Normal file
2
performance/sepolicy/file_contexts
Normal file
@ -0,0 +1,2 @@
|
||||
/vendor/bin/dump/dump_perf u:object_r:dump_perf_exec:s0
|
||||
|
Loading…
x
Reference in New Issue
Block a user