Skip to content

Commit

Permalink
ui: Merge canary -> stable
Browse files Browse the repository at this point in the history
Change-Id: I8d6728ef08495e3e3dfc111b85c5c423511c23f4
  • Loading branch information
stevegolton committed Aug 28, 2024
1 parent c457745 commit 0a53e68
Show file tree
Hide file tree
Showing 1,465 changed files with 85,042 additions and 34,297 deletions.
1 change: 1 addition & 0 deletions .bazelignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build --cxxopt=-std=c++17
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
.cproject
.deps_sha1
.DS_Store
.env
.eslintcache
.gclient*
.gm-actuals
Expand All @@ -20,16 +21,17 @@
*.pyc
*.sock
*.swp
/*.pftrace
/bazel-*
/compile_commands.json
/fuzz_out/
/out*
/ui/dist
/venv/*
perf.data*
TAGS
/*.pftrace
depot_tools/
examples/sdk/build/
GPATH
GRTAGS
GTAGS
perf.data*
TAGS
603 changes: 511 additions & 92 deletions Android.bp

Large diffs are not rendered by default.

35 changes: 34 additions & 1 deletion Android.bp.extras
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ gensrcs {
cmd: "mkdir -p $(genDir)/$(in) " +
"&& $(location aprotoc) " +
"--plugin=$(location protoc-gen-javastream) " +
"--javastream_opt=include_filter:perfetto.protos.TracePacket,perfetto.protos.ShellTransition,perfetto.protos.ShellHandlerMappings,perfetto.protos.ProtoLogMessage,perfetto.protos.ProtoLogViewerConfig,perfetto.protos.ShellHandlerMapping,perfetto.protos.ShellHandlerMappings,perfetto.protos.ProtoLogGroup,perfetto.protos.ProtoLogConfig,perfetto.protos.DataSourceConfig,perfetto.protos.InternedString,perfetto.protos.InternedData,perfetto.protos.ProtoLogLevel,perfetto.protos.TestEvent,perfetto.protos.TestEvent.TestPayload,perfetto.protos.TestConfig,perfetto.protos.TestConfig.DummyFields,perfetto.protos.WinscopeExtensionsImpl,perfetto.protos.InputMethodClientsTraceProto,perfetto.protos.InputMethodManagerServiceTraceProto,perfetto.protos.InputMethodServiceTraceProto " +
"--javastream_opt=include_filter:perfetto.protos.TracePacket,perfetto.protos.ShellTransition,perfetto.protos.ShellHandlerMappings,perfetto.protos.ProtoLogMessage,perfetto.protos.ProtoLogViewerConfig,perfetto.protos.ShellHandlerMapping,perfetto.protos.ShellHandlerMappings,perfetto.protos.ProtoLogGroup,perfetto.protos.ProtoLogConfig,perfetto.protos.DataSourceConfig,perfetto.protos.InternedString,perfetto.protos.InternedData,perfetto.protos.ProtoLogLevel,perfetto.protos.TestEvent,perfetto.protos.TestEvent.TestPayload,perfetto.protos.TestConfig,perfetto.protos.TestConfig.DummyFields,perfetto.protos.WinscopeExtensionsImpl,perfetto.protos.InputMethodClientsTraceProto,perfetto.protos.InputMethodManagerServiceTraceProto,perfetto.protos.InputMethodServiceTraceProto,perfetto.protos.ViewCapture,perfetto.protos.WindowManagerConfig,perfetto.protos.WindowManagerTraceEntry " +
"--javastream_out=$(genDir)/$(in) " +
"-Iexternal/protobuf/src " +
"-Iexternal/perfetto " +
Expand All @@ -198,6 +198,39 @@ gensrcs {
output_extension: "srcjar",
}

java_library {
name: "perfetto_config_java_protos",
srcs: [
":perfetto_config_filegroup_proto",
],
static_libs: [
"libprotobuf-java-lite",
],
proto: {
type: "lite",
canonical_path_from_root: false,
},
}

java_library {
name: "perfetto_config_java_protos_system_server_current",
srcs: [
":perfetto_config_filegroup_proto",
],
static_libs: [
"libprotobuf-java-lite",
],
proto: {
type: "lite",
canonical_path_from_root: false,
},
sdk_version: "system_server_current",
min_sdk_version: "35",
apex_available: [
"com.android.profiling",
],
}

prebuilt_etc {
name: "perfetto_persistent_cfg.pbtxt",
filename: "persistent_cfg.pbtxt",
Expand Down
462 changes: 406 additions & 56 deletions BUILD

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ if (enable_perfetto_platform_services) {
}

if (enable_perfetto_trace_processor && enable_perfetto_trace_processor_sqlite) {
if (enable_perfetto_grpc) {
all_targets += [ "src/bigtrace/orchestrator:orchestrator_main" ]
all_targets += [ "src/bigtrace/worker:worker_main" ]
}
all_targets += [ "src/trace_processor:trace_processor_shell" ]
}

Expand Down
55 changes: 53 additions & 2 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,15 +1,66 @@
Unreleased:
Tracing service and probes:
*
SQL Standard library:
* Removed `cpu.cpus` and `cpu.size` modules. The functions inside
for guessing core type were inaccurate and often misleading.
There is no replacement for these as there is no accurate data
source available.
* Moved `cpu.utilization` package to `linux.cpu.utilization`. The
functionality inside this package only works properly on Linux
and Linux derived OSes (e.g. Android).
* Moved `cpu.freq` module to `linux.cpu.frequency` and renamed
`cpu_freq_counters` to `cpu_frequency_counters` for the same
reason as above.
* Moved `gpu.frequency` to `android.gpu.frequency` for the same reason as
above.
* Moved `cpu.idle` module to `linux.cpu.idle` for the same
reason as above.
* Moved content of `linux.cpu_idle` into `linux.cpu.idle` to make it
consistent with above changes.
* Moved `memory.android.gpu` to `android.memory.gpu` to make it consistent
with above changes.`
* Moved contents of `memory.linux.process` to `linux.memory.process` and
`android.memory.process` to make it consistent with above changes.
* Moved `memory.linux.high_watermark` to `linux.memory.high_watermark` to
make it consistent with above changes.
* Moved `memory.heap_graph_dominator_tree` to
`android.memory.heap_graph.dominator_tree`. This is to allow for the
addition of more modules related to heap graphs.
Trace Processor:
* Added "time to initial display" and "time to full display" metrics to
the Android startup metric.
* Added `CREATE PERFETTO INDEX` to add sqlite-like indexes to Perfetto
tables. Has the same API as `CREATE INDEX`.
UI:
*
SDK:
*


v46.0 - 2024-06-13:
SQL Standard library:
* Added megacycles support to CPU package. Added tables:
`cpu_cycles_per_process`, `cpu_cycles_per_thread` and
`cpu_cycles_per_cpu`.
* Improved `memory` package. Added `memory.linux.process`,
`memory.linux.high_watermark` and `memory.android.gpu` modules.
* Created `gpu` package with `gpu.frequency` module.
* Migrated `sched.utilization` package to `cpu.utilization`.
Trace Processor:
* Added "time to initial display" and "time to full display" metrics to
the Android startup metric.
UI:
* Added plugin for synchronizing two instances of the UI - search for
'Enable timeline sync with other Perfetto UI tabs' in the command palette.
* Add builtin prompt functionality to the plugin API:
I.e. `await PluginContextTrace.prompt('...')`
* Fixed various bits of tech debt.
SDK:
* The TRACE_COUNTER macro and CounterTrack constructor no longer accept
`const char *` track names. In case your code fails to compile,
https://perfetto.dev/docs/instrumentation/track-events#dynamic-event-names
explains how to fix the problem.


v45.0 - 2024-05-09:
Trace Processor:
* Optimised single column `DISTINCT` queries.
Expand Down
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,30 @@
limitations under the License.


Copyright 2015 The Chromium Authors

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google LLC nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1 change: 0 additions & 1 deletion OWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

# Perfetto tracing internals and API/ABI boundaries.
[email protected]
[email protected]

# UI, Ftrace interop, traced_probes, protozero, Android internals.

Expand Down
3 changes: 2 additions & 1 deletion PRESUBMIT.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def RunAndReportIfLong(func, *args, **kargs):
start = time.time()
results = func(*args, **kargs)
end = time.time()
limit = 0.5 # seconds
limit = 3.0 # seconds
name = func.__name__
runtime = end - start
if runtime > limit:
Expand Down Expand Up @@ -52,6 +52,7 @@ def long_line_sources(x):
'/perfetto_build_flags.h$',
"infra/luci/.*",
"^ui/.*\.[jt]s$", # TS/JS handled by eslint
"^ui/pnpm-lock.yaml$",
])

results = []
Expand Down
10 changes: 10 additions & 0 deletions TEST_MAPPING
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{
"art-mainline-presubmit": [
{
"name": "CtsPerfettoTestCases",
"options": [
{
"include-filter": "HeapprofdJavaCtsTest*"
}
]
}
],
"presubmit": [
{
"name": "CtsPerfettoTestCases"
Expand Down
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ workspace(name = "perfetto")
new_local_repository(
name = "perfetto_cfg",
path = "bazel/standalone",
build_file_content = ""
build_file_content = "",
)

load("@perfetto//bazel:deps.bzl", "perfetto_deps")
Expand Down
1 change: 1 addition & 0 deletions bazel/deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,4 @@ def perfetto_deps():
def _add_repo_if_not_existing(repo_rule, name, **kwargs):
if name not in native.existing_rules():
repo_rule(name = name, **kwargs)

12 changes: 8 additions & 4 deletions bazel/proto_gen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,17 @@ def _proto_gen_impl(ctx):
strip_base_path = ctx.label.package + "/"
elif ctx.label.workspace_root:
# This path is hit when proto targets are built as @perfetto//:xxx
# instead of //:xxx. This happens in embedder builds. In this case,
# workspace_root == "external/perfetto" and we need to rebase the paths
# passed to protoc.
# instead of //:xxx. This happens in embedder builds.
proto_path = ctx.label.workspace_root
out_dir += "/" + ctx.label.workspace_root

# We could be using the sibling repository layout, in which case we do nothing.
if not ctx.label.workspace_root.startswith("../"):
# workspace_root == "external/perfetto" and we need to rebase the paths
# passed to protoc.
out_dir += "/" + ctx.label.workspace_root
strip_base_path = ctx.label.workspace_root + "/"


out_files = []
suffix = ctx.attr.suffix
for src in proto_src:
Expand Down
87 changes: 44 additions & 43 deletions buildtools/.gitignore
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
android_sdk/
android-core/
android-libbase/
android-libprocinfo/
android-logging/
android-unwinding/
aosp-*/
benchmark/
bionic/
bloaty/
catapult_trace_viewer/
clang_format/
clang/
d8/
debian_sid_arm-sysroot/
debian_sid_arm64-sysroot/
debian_sid_armel-sysroot/
emulator/
googletest/
grpc/src
jsoncpp/
libbacktrace/
libbase/
libcxx/
libcxxabi/
libfuzzer/
libunwind/
linenoise/
linux/
linux64/
llvm-project/
lzma/
mac/
ndk/
nodejs/
protobuf/
sqlite_src/
sqlite/
test_data/
typefaces/
win/
zlib/
zstd/
/android_sdk/
/android-core/
/android-libbase/
/android-libprocinfo/
/android-logging/
/android-unwinding/
/aosp-*/
/benchmark/
/bionic/
/bloaty/
/catapult_trace_viewer/
/clang_format/
/clang/
/d8/
/debian_sid_arm-sysroot/
/debian_sid_arm64-sysroot/
/debian_sid_armel-sysroot/
/emulator/
/googletest/
/grpc/src/
/jsoncpp/
/libbacktrace/
/libbase/
/libcxx/
/libcxxabi/
/libfuzzer/
/libunwind/
/linenoise/
/linux/
/linux64/
/llvm-project/
/lzma/
/mac/
/ndk/
/nodejs/
/pigweed/
/protobuf/
/sqlite_src/
/sqlite/
/test_data/
/typefaces/
/win/
/zlib/
/zstd/
Loading

0 comments on commit 0a53e68

Please sign in to comment.