[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: perf: prctl(PR_TASK_PERF_EVENTS_DISABLE) has no effect
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, consumes env(PERF_*)
for configuration, registers with
at_exit() for cleanup */
if (!handle)
/* burn */

/* do you other code */


/* do the bit you want profiled */


Then build with -lperfrecord or so. Not too hard, right?

 \ /
  Last update: 2012-01-30 12:03    [W:0.046 / U:7.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site