mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-20 23:28:23 +02:00
perfetto: v56.1 update
The tracing SDK is now maintained outside the main Perfetto source tree. Reviewed-by: Rob Clark <rob.clark@oss.qualcomm.com> Reviewed-by: Dylan Baker <dylan.c.baker@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/42035>
This commit is contained in:
parent
6a010343d4
commit
aabf7b9a94
6 changed files with 45 additions and 14 deletions
|
|
@ -148,7 +148,7 @@ fi
|
|||
# these projects and making them warning-free is not our goal.
|
||||
# shellcheck disable=2206
|
||||
meson_subprojects=(
|
||||
perfetto
|
||||
perfetto-sdk
|
||||
syn-2-rs
|
||||
paste-1-rs
|
||||
pest-2-rs
|
||||
|
|
|
|||
|
|
@ -67,12 +67,12 @@ To capture a trace with Perfetto you need to take the following steps:
|
|||
# Build mesa
|
||||
mesa $ meson compile -C build
|
||||
|
||||
2. Build Perfetto from sources available at ``subprojects/perfetto``.
|
||||
2. Clone and build Perfetto toolkit (``v56.1``).
|
||||
|
||||
.. code-block:: sh
|
||||
|
||||
# Within the Mesa repo, build perfetto
|
||||
mesa $ cd subprojects/perfetto
|
||||
src $ git clone --branch v56.1 --depth 1 https://github.com/google/perfetto.git
|
||||
src $ cd perfetto
|
||||
perfetto $ ./tools/install-build-deps
|
||||
perfetto $ ./tools/gn gen --args='is_debug=false' out/linux
|
||||
perfetto $ ./tools/ninja -C out/linux
|
||||
|
|
@ -87,7 +87,7 @@ More build options can be found in `this guide <https://perfetto.dev/docs/quicks
|
|||
``src/tool/pps/cfg/system.cfg`` which does whole-system including GPU
|
||||
profiling for any supported GPUs). Other configs are available in that
|
||||
directory for CPU-only or GPU-only tracing, and more examples of config files
|
||||
can be found in ``subprojects/perfetto/test/configs``.
|
||||
can be found in ``perfetto/test/configs``.
|
||||
|
||||
4. Start the PPS producer to capture GPU performance counters.
|
||||
|
||||
|
|
@ -106,7 +106,7 @@ More build options can be found in `this guide <https://perfetto.dev/docs/quicks
|
|||
|
||||
.. code-block:: sh
|
||||
|
||||
mesa $ sudo ./subprojects/perfetto/out/linux/tracebox --system-sockets --txt -c src/tool/pps/cfg/system.cfg -o vkcube.trace
|
||||
mesa $ sudo ./perfetto/out/linux/tracebox --system-sockets --txt -c src/tool/pps/cfg/system.cfg -o vkcube.trace
|
||||
|
||||
7. Go to `ui.perfetto.dev <https://ui.perfetto.dev>`__ and upload
|
||||
``vkcube.trace`` by clicking on **Open trace file**.
|
||||
|
|
|
|||
|
|
@ -2367,10 +2367,11 @@ with_perfetto = get_option('perfetto')
|
|||
with_datasources = get_option('datasources')
|
||||
with_any_datasource = with_datasources.length() != 0
|
||||
if with_perfetto
|
||||
dep_perfetto = dependency(
|
||||
dep_perfetto_sdk = dependency(
|
||||
'perfetto',
|
||||
fallback: allow_fallback_for_perfetto ? ['perfetto', 'dep_perfetto'] : [],
|
||||
fallback: allow_fallback_for_perfetto ? ['perfetto-sdk', 'dep_perfetto_sdk'] : [],
|
||||
)
|
||||
dep_perfetto = dep_perfetto_sdk
|
||||
pre_args += '-DHAVE_PERFETTO'
|
||||
endif
|
||||
|
||||
|
|
|
|||
28
subprojects/packagefiles/perfetto-sdk/meson.build
Normal file
28
subprojects/packagefiles/perfetto-sdk/meson.build
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
project(
|
||||
'perfetto-sdk',
|
||||
['cpp'],
|
||||
)
|
||||
|
||||
cpp = meson.get_compiler('cpp')
|
||||
|
||||
deps_perfetto = [dependency('threads')]
|
||||
|
||||
if host_machine.system() == 'android'
|
||||
deps_perfetto += cpp.find_library('log')
|
||||
endif
|
||||
|
||||
lib_perfetto = static_library(
|
||||
'perfetto',
|
||||
sources: 'perfetto.cc',
|
||||
dependencies: deps_perfetto,
|
||||
install: false,
|
||||
override_options : ['cpp_std=c++17']
|
||||
)
|
||||
|
||||
inc_perfetto = include_directories('.')
|
||||
|
||||
dep_perfetto_sdk = declare_dependency(
|
||||
link_with: lib_perfetto,
|
||||
include_directories: inc_perfetto,
|
||||
dependencies: deps_perfetto,
|
||||
)
|
||||
8
subprojects/perfetto-sdk.wrap
Normal file
8
subprojects/perfetto-sdk.wrap
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[wrap-file]
|
||||
directory = perfetto-sdk
|
||||
lead_directory_missing = true
|
||||
|
||||
source_url = https://github.com/google/perfetto/releases/download/v56.1/perfetto-cpp-sdk-src.zip
|
||||
source_filename = perfetto-cpp-sdk-src-v56.1.zip
|
||||
source_hash = 9138dad1ab39048a61d3333e0c2ebf32a7497ed45e3b7daa5f3a02c14748af38
|
||||
patch_directory = perfetto-sdk
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
[wrap-git]
|
||||
directory = perfetto
|
||||
|
||||
url = https://github.com/google/perfetto
|
||||
revision = v47.0
|
||||
depth = 1
|
||||
Loading…
Add table
Reference in a new issue