Commit Graph

2 Commits

Author SHA1 Message Date
Sami Kyöstilä 0ff4f5a7e9 util: Shut down Perfetto before driver unload
Shut down Perfetto before unloading the driver to fix a crash caused by
an internal Perfetto thread that kept running after dlclose() took away
its code.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4909
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17454>
2022-07-14 00:41:51 +00:00
Rob Clark ecfb00fb09 util/perfetto: Add one-time init
Various places around mesa which might want to register a data-source,
etc, should call util_perfetto_init() first to ensure we connect to the
tracing service.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Antonio Caggiano <antonio.caggiano@collabora.com>
Acked-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9901>
2021-05-10 15:34:07 +00:00