melatonin_perfetto icon indicating copy to clipboard operation
melatonin_perfetto copied to clipboard

Explicit Linux Support

Open sudara opened this issue 2 years ago • 8 comments

See: https://forum.juce.com/t/new-module-profile-your-juce-ui-dsp-performance-with-perfetto/54589/56?u=sudara

  • [x] Default location for dump files (right now it's (juce::File::SpecialLocationType::userHomeDirectory).getChildFile ("Downloads")
  • [x] Add linux to the matrix on GitHub Actions. See potential failures here: https://github.com/sudara/melatonin_perfetto/issues/7#issuecomment-1379304435
  • [ ] Add jassert if folder isn't there / happy
  • [ ] Update docs to be more explicit about locations

sudara avatar Sep 10 '23 13:09 sudara

@psemiletov Can you let me know which location is best for you? What do you think a good default folder for the trace files is?

If you want to get it working before this issue is fixed, see the juce internals for how userHomeDirectory is resolved, you might need to make a Downloads folder there and then that should work?...

https://github.com/juce-framework/JUCE/blob/master/modules/juce_core/native/juce_Files_linux.cpp#L107-L115

sudara avatar Sep 10 '23 13:09 sudara

Hello! The location does not matter (but, for example it can be userDocumentsDirectory /from JUCE File File::getSpecialLocation (const SpecialLocationType type)/, the important thing to produce trace file at all, and would be fine to know from the documentation where to find such file and what is file's name. When I ran my plugin with profiler, I saw profiler's messages at console, but can't find a file :(

psemiletov avatar Sep 10 '23 15:09 psemiletov

@psemiletov

Thanks! I'll move it to userDocumentsDirectory for now, there's a couple commits on the linux branch.

The name and location of the file are written to cout when the application is gracefully quit.

Please note that no file is written if you just kill the process (like hitting stop in an IDE).

I'll get tests on linux running in a branch to clear things up.

sudara avatar Sep 10 '23 17:09 sudara

For me, the following is logged to cout:

Wrote perfetto trace to: /Users/sudara/Downloads/perfetto-DEBUG-2023-09-10_1937.pftrace

sudara avatar Sep 10 '23 17:09 sudara

When you merge it to main branch I'll be able to try it from Drumlabooh cmake build :)

psemiletov avatar Sep 10 '23 18:09 psemiletov

Looks like there are some build issues in CI that I will have to come back to look at.

In the meantime, you can check cout to see where it's being written or run off the branch.

sudara avatar Sep 10 '23 18:09 sudara

Any updates on this? Also willing to look into this if @sudara does not have the time a the moment

TheOnlyJoey avatar Feb 22 '24 16:02 TheOnlyJoey

@TheOnlyJoey Hey hey! I'm just back from vacation — if you are motivated, I'd say go for it! It shouldn't be too tough, it's more about getting things happy in CI, hopefully perfetto itself is happy on linux?...

sudara avatar Mar 03 '24 09:03 sudara