Nevermind, I was able to get root access on the machines.  I have a
different problem now, though -- it reports all of the per-CPU counts
as 0.  On a two-threaded program:

$ ./task -e core::INSTRUCTIONS_RETIRED:u -- ~/tests/perfmttest/base

       2,000,260,890 core::INSTRUCTIONS_RETIRED:u (0.00% scaling,
ena=666,006,077, run=666,006,077)
$ ./task -i -e core::INSTRUCTIONS_RETIRED:u -- ~/tests/perfmttest/base

       4,000,335,689 core::INSTRUCTIONS_RETIRED:u (0.00% scaling,
ena=1,318,628,553, run=1,318,628,553)
$ ./task_cpu -i -e core::INSTRUCTIONS_RETIRED:u -- ~/tests/perfmttest/base

CPU0                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU1                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU2                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU3                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU4                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU5                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU6                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

CPU7                     0 core::INSTRUCTIONS_RETIRED:u (100.00%
scaling, ena=0, run=0)

It's not printing any error messages, so I'm not sure where to start
debugging it.  Could it be a kernel issue?  task_cpu worked fine for
me on my desktop, which is CentOS with a 2.6.33 kernel, but this
server is Ubuntu with 2.6.32.  In both cases, I have the most recent
git tree.

-dan


On Fri, Jul 15, 2011 at 6:13 PM, Dan Upton <up...@virginia.edu> wrote:
> Ah, okay, it had occurred to me that might be the case, but I don't
> have root on that machine so I couldn't test it before asking on the
> list.  Is there a way to uniquely measure a multithreaded application
> that doesn't require root?  I tried just using something like task or
> task_smpl, but on a pthread application with two threads it only
> appears to monitor the main thread and not the worker child (based on
> a comparison of instruction count from task and from Pin).
>
> -dan
>
> On Fri, Jul 15, 2011 at 5:03 PM, Vince Weaver <vweav...@eecs.utk.edu> wrote:
>> On Fri, 15 Jul 2011, Dan Upton wrote:
>>
>>> I'm trying to monitor some multithreaded applications and I just found
>>> the task_cpu example tool.  I can't get it to attach to any program
>>> though, single or multithreaded, even something as simple as ls:
>>>
>>> $ ./task_cpu -- /bin/ls
>>> task_cpu: cannot attach event0 PERF_COUNT_HW_CPU_CYCLES: Permission denied
>>>
>>> However, task_smpl and task work fine.  Is something special required
>>> to get task_cpu to work?
>>
>> For security reasons you need root permission to access the CPU-level
>> counters.  This is because when you monitor CPU-wide you monitor *all*
>> processes on the CPU, including ones that don't belong to you.
>>
>> Vince
>>
>

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
perfmon2-devel mailing list
perfmon2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perfmon2-devel

Reply via email to