diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 7737bb37643..ced80bcc6de 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -406,9 +406,6 @@ eglGetDisplay(EGLNativeDisplayType nativeDisplay) _EGLDisplay *disp; void *native_display_ptr; -#if !DETECT_OS_ANDROID - util_cpu_trace_init(); -#endif _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL); STATIC_ASSERT(sizeof(void *) >= sizeof(nativeDisplay)); @@ -473,9 +470,6 @@ eglGetPlatformDisplayEXT(EGLenum platform, void *native_display, EGLAttrib *attrib_list; EGLDisplay disp; -#if !DETECT_OS_ANDROID - util_cpu_trace_init(); -#endif _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL); if (_eglConvertIntsToAttribs(int_attribs, &attrib_list) != EGL_SUCCESS) @@ -490,9 +484,6 @@ PUBLIC EGLDisplay EGLAPIENTRY eglGetPlatformDisplay(EGLenum platform, void *native_display, const EGLAttrib *attrib_list) { -#if !DETECT_OS_ANDROID - util_cpu_trace_init(); -#endif _EGL_FUNC_START(NULL, EGL_OBJECT_THREAD_KHR, NULL); return _eglGetPlatformDisplayCommon(platform, native_display, attrib_list); } @@ -666,7 +657,6 @@ eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor) { _EGLDisplay *disp = _eglLockDisplay(dpy); - util_cpu_trace_init(); _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL); _eglDeviceRefreshList(); diff --git a/src/freedreno/drm/freedreno_drm_perfetto.cc b/src/freedreno/drm/freedreno_drm_perfetto.cc index 7edd075b355..9d6a22117db 100644 --- a/src/freedreno/drm/freedreno_drm_perfetto.cc +++ b/src/freedreno/drm/freedreno_drm_perfetto.cc @@ -53,8 +53,6 @@ PERFETTO_DEFINE_DATA_SOURCE_STATIC_MEMBERS(FdMemoryDataSource); extern "C" void fd_drm_perfetto_init(void) { - util_perfetto_init(); - perfetto::DataSourceDescriptor dsd; dsd.set_name("gpu.memory.msm"); FdMemoryDataSource::Register(dsd); diff --git a/src/freedreno/vulkan/tu_perfetto.cc b/src/freedreno/vulkan/tu_perfetto.cc index a4a1619a020..6dbf2ae323d 100644 --- a/src/freedreno/vulkan/tu_perfetto.cc +++ b/src/freedreno/vulkan/tu_perfetto.cc @@ -345,8 +345,6 @@ extern "C" { void tu_perfetto_init(void) { - util_perfetto_init(); - { perfetto::DataSourceDescriptor dsd; #if DETECT_OS_ANDROID diff --git a/src/gallium/auxiliary/pipe-loader/pipe_loader.c b/src/gallium/auxiliary/pipe-loader/pipe_loader.c index 15994fab7a6..1f54a3b8b84 100644 --- a/src/gallium/auxiliary/pipe-loader/pipe_loader.c +++ b/src/gallium/auxiliary/pipe-loader/pipe_loader.c @@ -32,6 +32,7 @@ #include "util/u_string.h" #include "util/xmlconfig.h" #include "util/driconf.h" +#include "util/perf/cpu_trace.h" #include @@ -169,6 +170,8 @@ pipe_loader_create_screen_vk(struct pipe_loader_device *dev, bool sw_vk, bool dr { struct pipe_screen_config config; + util_cpu_trace_init(); + pipe_loader_load_options(dev); config.driver_name_is_inferred = driver_name_is_inferred; config.options_info = &dev->option_info; diff --git a/src/gallium/drivers/freedreno/freedreno_perfetto.cc b/src/gallium/drivers/freedreno/freedreno_perfetto.cc index d5825fb589d..6d77f8b15bf 100644 --- a/src/gallium/drivers/freedreno/freedreno_perfetto.cc +++ b/src/gallium/drivers/freedreno/freedreno_perfetto.cc @@ -261,8 +261,6 @@ extern "C" { void fd_perfetto_init(void) { - util_perfetto_init(); - perfetto::DataSourceDescriptor dsd; #if DETECT_OS_ANDROID // Android tooling expects this data source name diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 9fe219dfda3..f45b048789c 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -966,8 +966,6 @@ panfrost_create_screen(int fd, const struct pipe_screen_config *config, screen->max_afbc_packing_ratio = debug_get_num_option( "PAN_MAX_AFBC_PACKING_RATIO", DEFAULT_MAX_AFBC_PACKING_RATIO); - util_cpu_trace_init(); - if (panfrost_open_device(screen, fd, dev)) { ralloc_free(screen); return NULL; diff --git a/src/gallium/drivers/radeonsi/si_perfetto.cpp b/src/gallium/drivers/radeonsi/si_perfetto.cpp index 054ae597c16..1f24b4ae9fa 100644 --- a/src/gallium/drivers/radeonsi/si_perfetto.cpp +++ b/src/gallium/drivers/radeonsi/si_perfetto.cpp @@ -316,7 +316,6 @@ void si_ds_end_submit(struct si_ds_queue *queue, uint64_t start_ts) 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 diff --git a/src/gallium/drivers/v3d/v3d_screen.c b/src/gallium/drivers/v3d/v3d_screen.c index ed0455f1fba..a9f00a44a1b 100644 --- a/src/gallium/drivers/v3d/v3d_screen.c +++ b/src/gallium/drivers/v3d/v3d_screen.c @@ -767,8 +767,6 @@ v3d_screen_create(int fd, const struct pipe_screen_config *config, struct v3d_screen *screen = rzalloc(NULL, struct v3d_screen); struct pipe_screen *pscreen; - util_cpu_trace_init(); - pscreen = &screen->base; pscreen->destroy = v3d_screen_destroy; diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c index f7fc285f66c..5c8d76442a9 100644 --- a/src/gallium/drivers/vc4/vc4_screen.c +++ b/src/gallium/drivers/vc4/vc4_screen.c @@ -466,8 +466,6 @@ vc4_screen_create(int fd, const struct pipe_screen_config *config, struct pipe_screen *pscreen; int err; - util_cpu_trace_init(); - pscreen = &screen->base; pscreen->destroy = vc4_screen_destroy; diff --git a/src/intel/ds/intel_driver_ds.cc b/src/intel/ds/intel_driver_ds.cc index 0934487066a..152563257c3 100644 --- a/src/intel/ds/intel_driver_ds.cc +++ b/src/intel/ds/intel_driver_ds.cc @@ -594,7 +594,6 @@ static void 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 diff --git a/src/panfrost/vulkan/panvk_utrace_perfetto.cc b/src/panfrost/vulkan/panvk_utrace_perfetto.cc index 743e4b1abea..ffbdfe24faa 100644 --- a/src/panfrost/vulkan/panvk_utrace_perfetto.cc +++ b/src/panfrost/vulkan/panvk_utrace_perfetto.cc @@ -304,8 +304,6 @@ panvk_utrace_perfetto_init(struct panvk_device *dev, uint32_t queue_count) for (uint32_t i = 0; i < ARRAY_SIZE(utp->stage_iids); i++) utp->stage_iids[i] = next_iid++; - util_perfetto_init(); - static once_flag register_ds_once = ONCE_FLAG_INIT; call_once(®ister_ds_once, register_data_source); }