linux-mips
[Top] [All Lists]

Re: is there a way to read cp0_performance in user space?

To: zhuzhenhua <zzh.hust@gmail.com>
Subject: Re: is there a way to read cp0_performance in user space?
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 14 Mar 2006 12:41:00 +0000
Cc: linux-mips <linux-mips@linux-mips.org>
In-reply-to: <50c9a2250603131856n61c75573w99b4e5f4e3bbce10@mail.gmail.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <50c9a2250603131856n61c75573w99b4e5f4e3bbce10@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Tue, Mar 14, 2006 at 10:56:57AM +0800, zhuzhenhua wrote:

> to test my deocder program, i want read cp0_performance, is there a
> way to do that in linux?

There is no interface to directly access the performance counter registers
from an application as it is a priviledged CPU resource.  You can
however use oprofile's kernel interfaces.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>