Skip to content

Sampling profiling not working? #143

@arvid-norlander

Description

@arvid-norlander

I do not get CPU samples from my program using these bindings (on Ubuntu 24.04), and I can't figure out what I'm doing wrong. I don't have Windows or MacOS to test with.

I can do sampling profiling perfectly well using perf as the same user. I'm not running under docker. So it is not a permission problem. And as far as I can tell, the client is built with sampling support enabled. Tracing spans works correctly.

It seems to use the correct features? As output by cargo add:

      Adding tracing-tracy (workspace) to optional dependencies
             Features as of v0.11.4:
             + broadcast
             + callstack-inlines
             + code-transfer
             + context-switch-tracing
             + debuginfod
             + enable
             + sampling
             + system-tracing
             - delayed-init
             - demangle
             - fibers
             - flush-on-exit
             - manual-lifetime
             - ondemand
             - only-ipv4
             - only-localhost
             - timer-fallback
             - verify

I don't know how to debug this further. According to upstream docs it should be used automatically when possible, assuming the support was enabled as build time.

If there isn't anything I have missed: I guess the next step would be to write a simple C++ program that just loops and uses tracy directly to see if that works?

  • Ubuntu 24.04
  • Kernel 6.8.0-41-generic
  • 12th Gen Intel(R) Core(TM) i9-12950HX

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions