perfetto/android: align datasource names with tooling expectations
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

A few Android tools are based on/assume the datasource names
gpu.renderstages and gpu.counters. It is less effort to align with that
naming for Android builds than to chase down those tools and fix them,
not to mention account for new tools that may be created in the future.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34330>
This commit is contained in:
Renato Pereyra 2025-04-01 13:21:36 -05:00 committed by Marge Bot
parent b895c0ec05
commit 7190949927
6 changed files with 27 additions and 1 deletions

View file

@ -339,7 +339,7 @@ tu_perfetto_init(void)
{
perfetto::DataSourceDescriptor dsd;
#if DETECT_OS_ANDROID
/* AGI requires this name */
// Android tooling expects this data source name
dsd.set_name("gpu.renderstages");
#else
dsd.set_name("gpu.renderstages.msm");

View file

@ -268,7 +268,12 @@ fd_perfetto_init(void)
util_perfetto_init();
perfetto::DataSourceDescriptor dsd;
#if DETECT_OS_ANDROID
// Android tooling expects this data source name
dsd.set_name("gpu.renderstages");
#else
dsd.set_name("gpu.renderstages.msm");
#endif
FdRenderpassDataSource::Register(dsd);
}

View file

@ -325,7 +325,12 @@ static void si_driver_ds_init_once(void)
#ifdef HAVE_PERFETTO
util_perfetto_init();
perfetto::DataSourceDescriptor dsd;
#if DETECT_OS_ANDROID
// Android tooling expects this data source name
dsd.set_name("gpu.renderstages");
#else
dsd.set_name("gpu.renderstages.amd");
#endif
SIRenderpassDataSource::Register(dsd);
#endif
}

View file

@ -578,7 +578,12 @@ intel_driver_ds_init_once(void)
#ifdef HAVE_PERFETTO
util_perfetto_init();
perfetto::DataSourceDescriptor dsd;
#if DETECT_OS_ANDROID
// Android tooling expects this data source name
dsd.set_name("gpu.renderstages");
#else
dsd.set_name("gpu.renderstages.intel");
#endif
IntelRenderpassDataSource::Register(dsd);
#endif
}

View file

@ -255,7 +255,12 @@ static void
register_data_source(void)
{
perfetto::DataSourceDescriptor dsd;
#if DETECT_OS_ANDROID
// Android tooling expects this data source name
dsd.set_name("gpu.renderstages");
#else
dsd.set_name("gpu.renderstages.panfrost");
#endif
PanVKRenderpassDataSource::Register(dsd);
}

View file

@ -8,6 +8,7 @@
* SPDX-License-Identifier: MIT
*/
#include "util/detect_os.h"
#include "pps_datasource.h"
#include "pps_driver.h"
@ -147,7 +148,12 @@ void GpuDataSource::register_data_source(const std::string &_driver_name)
{
driver_name = _driver_name;
static perfetto::DataSourceDescriptor dsd;
#if DETECT_OS_ANDROID
// Android tooling expects this data source name
dsd.set_name("gpu.counters");
#else
dsd.set_name("gpu.counters." + driver_name);
#endif
Register(dsd);
}