[Top] [All Lists]

Re: [PATCH v5 06/12] MIPS: add support for hardware performance

To: David Daney <>
Subject: Re: [PATCH v5 06/12] MIPS: add support for hardware performance events (mipsxx)
From: Deng-Cheng Zhu <>
Date: Sat, 29 May 2010 11:10:05 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=uWxniqffgpaL0nn5GnfInPGjxAmKZ9SDoQU5bi/WCAc=; b=H7fZOqr3kE84Now55LUT4uaDDWdpiF/D+XM5GqyFpbBHLvxoyWVHTNmJfJbDK7ehAH gxhSOH5Qbo/jSJbcQ7Y3/oTGcmdpsFfAiLMS+A2+yP560HdmvtrXIXQ8YeZ/ONij4VkU DoNBjX8/qvtFnrqOi8WMdfQrXhfGxFWx+EBy0=
Domainkey-signature: a=rsa-sha1; c=nofws;; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=KYy2nl9I7QuDrSSqE0IoqgUoJOJs53SjtY+/uWdq2skoegLezTXrVsuCc7dPDbplrv r0VXLRsH/RJELNMHoDCCGUTiFfESg+xwRY6a1QeDv6WCIcvIjYRiCNY4xEfzVXN/CE1c WiDNmO8BL5iKfd27q0rZq+WONdT1mrFzv6928=
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <>
2010/5/28 David Daney <>:
> General comments:
> Can you separate the code that reads and writes the performance counter
> registers from the definitions of the various counters themselves?
1) Do you mean to move M_PERFCTL_* stuff out into pmu.h (or mipsregs.h)?
If yes, that's OK. Again (my reply for [1/12] mentions this for the 1st
time): After making Oprofile use Perf-events as backend (patches 8~12 do
this), register definitions and read/write functions will locate in pmu.h
(or mipsregs.h) and perf_event_$cpu.c, respectively.
2) According to your reply to [7/12], do you mean the perf counter
read/write functions (such as mipsxx_pmu_read_counter()) are generic
support functions? No, they are specific for mipsxx CPUs.

> Also take into account that the counter registers may be either 32 or 64
> bits wide.  The interfaces you are defining should take that into account
> even if the specific implementations only work with 32-bit registers.
[DC]: OK.


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