Hi,

On Thu, Jul 2, 2009 at 12:06 AM, Tanima Dey<dey_tr...@yahoo.com> wrote:
> Hi,
> Thanks for the reply.
> To get the version of the perfmon tool, I used pfm_get_version() and got the
> following information:
>
> version: 196616
> PFMLIB_MAJ_VERSION=3
> PFMLIB_MIN_VERSION= 8
>
> The kernel version is: Linux 2.6.25
>
> Actually I can read the counters normally and now am trying to read those in
> a thread using pthreads. I found one document that mentions that the context
> should be attached to a thread and that thread must be pinned to a
> particular core. I am trying to that, but it is showing me the same error
> message as follows:
>
You have two modes of operations:
   - per-thread: you measure only one thread, monitoring follows the
threads when it migrates to different cores
   - system-wide: monitoring only one CPU at a time, all threads
running on that CPU are monitored

In per-thread mode, the thread must be stopped (via ptrace) when you
want to attach to it or read the counts.
This is an implementation restriction.

>  pfm_load_context error errno 1
> pfm_start error errno 22
> pfm_stop error errno 22
>
You should take a look at the examples_v2.x in the libpfm source tree.
It shows you how to attach to a
thread.

> I have also tried the pfm_strerr() function to know the error name, but it
> shows the following message.
pfm_strerror() reports errors generated by libpfm not the kernel
perfmon API, for that use regular strerror().

------------------------------------------------------------------------------
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to