perfetto icon indicating copy to clipboard operation
perfetto copied to clipboard

Multiple identical data sources

Open djdeath opened this issue 3 years ago • 2 comments

I have a system with multiple GPUs (multiple of the same vendor). I would like to create a data source for each of the GPU to report metrics, but it seems at the moment I have to create a data source class for each one.

I've tried to instantiate the data source class multiple times for each GPU, each with a different name, but it seems that the second instances are not visible to the perfetto system.

Is there a way to achieve this without creating multiple classes?

djdeath avatar Nov 22 '22 08:11 djdeath

Can you provide more concrete examples of what your classes/configs look like? It's a bit hard to parse exactly what issue you are facing atm.

@ddiproietto FYI.

LalitMaganti avatar Nov 22 '22 11:11 LalitMaganti

Sure, I have this GpuDataSource class : https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/tool/pps/pps_datasource.h#L31

And what I would like to do is to register it multiple times like this : https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/tool/pps/pps_datasource.cc#L144

So far if I register more than once, even with different source name, the second one is never started, even if its name is in the perfetto config file.

djdeath avatar Nov 22 '22 12:11 djdeath