On Mon, 2012-01-30 at 11:11 +0100, Ingo Molnar wrote:
> So, what workflow are you suggesting to Andrew?

Librarize perf record, then in your code do something like:

#include "perf_record.h"

  handle = perf_record_init(); /* creates perf events and creates
                                  a record thread that writes samples
                                  to perf.data, consumes env(PERF_*)
                                  for configuration, registers with
                                  at_exit() for cleanup */
  if (!handle)
    /* burn */

  /* do you other code */

  perf_record_start(handle);

  /* do the bit you want profiled */

  perf_record_stop(handle);

Then build with -lperfrecord or so. Not too hard, right?
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to