public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Cohen <wcohen@nc.rr.com>
To: eranian@hpl.hp.com
Cc: linux-kernel@vger.kernel.org, perfmon@napali.hpl.hp.com,
	perfctr-devel@lists.sourceforge.net, linux-ia64@vger.kernel.org,
	oprofile-list <oprofile-list@lists.sourceforge.net>
Subject: Re: [Perfctr-devel] 2.6.16-rc5 perfmon2 new code base + libpfm with Montecito support
Date: Mon, 13 Mar 2006 15:58:06 -0500	[thread overview]
Message-ID: <4415DCDE.1080507@nc.rr.com> (raw)
In-Reply-To: <20060313202554.GD32683@frankl.hpl.hp.com>

Stephane Eranian wrote:
> Will,
> 
> On Mon, Mar 13, 2006 at 02:15:53PM -0500, William Cohen wrote:
> 
>>Yes, I have a similar patch for i386 in the kernel. I don't yet have 
>>modifications for opcontrol or ophelp.
> 
> 
> Your patch is very close to mine. I'll merge tthe two and will include
> it in my next version.
> 
> My understand of opcontrol is that is passes the information from ophelp
> to the kernel via /dev/oprofile. I don't know how it passes it to the oprofiled
> daemon.
> 
> The daemon should not be difficult to change. I hacked something quickly
> and got it up on pentium M. The only remaining problem is ophelp, I think.

Is new identifier cpu_type being created or is i386/pentium_m being used 
also for perfmon2? It could be inferred that perfmon2 is being used if 
the procesor is identified, but there are no number directories for the 
counters (/dev/oprofile/[0-9]+).

I looked over the code this afternoon to refresh my memory how it actual 
work (as opposed to how I thought it works).

ophelp uses oprofile/libop/op_cpu_type.c:op_get_cpu_type to read 
/dev/oprofile/cpu_type. Once ophelp obtains the cpu type the appropriate 
directory from /usr/share/oprofile for the events. This information is 
passed to oprofiled; you can see it with "opcontrol --start --verbose".

oprofile/daemon/opd_perfmon.c and opd_perfmon.h are the place that the 
performance monitoring hardware is set for perfmon. 
opd_perfmon.c:write_pmu() is currently hard coded for ia64. As you have 
seen, it doesn't use the libpfm to set up the performance monitoring 
hardware.

Looking over the code in the linux/arch/i386/oprofile the code for 
typing the processor is tied to the initialization of the performance 
monitoring hardware. Probably want to factor out cpu idenification code 
from oprofile native handling of the performance monitoring code. So the 
pseudo code is something like in 
linux/arch/i386/oprofile/init.c:oprofile_arch_init():

char *processor_id = identify_processer();
ret = op_perfmon_support(ops, processor_id);
if (ret < 0)
	ret = op_nmi_init(ops, processor_id);
if (ret < 0)
	ret = op_nmi_timer(ops, processor_id);
return ret;

-Will


  reply	other threads:[~2006-03-13 21:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-08 15:53 2.6.16-rc5 perfmon2 new code base + libpfm with Montecito support Stephane Eranian
2006-03-08 20:40 ` William Cohen
2006-03-08 21:22   ` Stephane Eranian
2006-03-13 18:39 ` [Perfctr-devel] " William Cohen
2006-03-13 18:55   ` Stephane Eranian
2006-03-13 19:15     ` William Cohen
2006-03-13 20:25       ` Stephane Eranian
2006-03-13 20:58         ` William Cohen [this message]
2006-03-13 21:21           ` Stephane Eranian
     [not found]       ` <20060313210127.GA13453@totally.trollied.org>
     [not found]         ` <20060313210354.GG32683@frankl.hpl.hp.com>
     [not found]           ` <20060313232057.GA16582@totally.trollied.org>
2006-03-13 23:58             ` Stephane Eranian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4415DCDE.1080507@nc.rr.com \
    --to=wcohen@nc.rr.com \
    --cc=eranian@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oprofile-list@lists.sourceforge.net \
    --cc=perfctr-devel@lists.sourceforge.net \
    --cc=perfmon@napali.hpl.hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox