3

I have been running a short-running program (about 1/8th of a second user CPU time), and no matter how hard I try, I can never get more than about 90 samples. Frankly, this is not fine-grained enough.

This means that no more than about 1K alarms/second can be set and processed.

Is there a way to narrow the sample period? It is well-understood that this will slow down the program (will it add more context switches), but it is important that I be able to get such rapid sampling.

Note that I am running in 3.2 LINUX, on an x86_64 setarch'd to 32-bit mode. The 32-bit mode is important, as the final target will be on 32-bit devices.

Please see this follow-up question that asks about the LINUX profile timer directly: /questions/22848764

Mark Gerolimatos
  • 2,424
  • 1
  • 23
  • 33
  • "Is there a way to narrow the sample period?" - Use more modern profiler, for example `perf` with hardware performance event (Its cpu-clock/task-clock may have the same 1kHz limit). There is no easy way to get > 1 kHz (for CONFIG_HZ=1000) from gperftools without major kernel modification. – osgx Oct 18 '15 at 01:02

0 Answers0