hotspot icon indicating copy to clipboard operation
hotspot copied to clipboard

flexible time measurements between trace points

Open milianw opened this issue 2 years ago • 0 comments

now that we are getting support for trace points, it would be good if we could take this a step further: similar to sched switch in/out events, we might want to measure time between trace points and show that as the cost instead of the number of calls.

to facilitate, I would say we should add a basic configuration page, which allows the user to define patterns that can be matched against trace point names to find pairs. For example we could use something like this to measure times between syscalls:

  • startPattern: ^sys_enter_(.+)$
  • stopPattern: ^sys_exit_\1$
  • costName: \1 time

Similarly, it should be possible to measure times between singular trace points, e.g. to measure the frame time by adding a uprobe in QPlatformBackingStore::composeAndFlush and then using this pattern configuration:

  • startPattern: ^probe_.+:QPlatformBackingStore::composeAndFlush$
  • endPattern: \0
  • costName: frame time

milianw avatar Oct 31 '21 10:10 milianw