mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-18 01:40:35 +02:00
perfetto/android: align datasource names with tooling expectations
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:
parent
b895c0ec05
commit
7190949927
6 changed files with 27 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue