public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephane Eranian <eranian@hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: Re: [PATCH] - Fix get_model_name() for mixed cpu type systems
Date: Wed, 18 Oct 2006 22:57:39 +0000	[thread overview]
Message-ID: <20061018225739.GF20590@frankl.hpl.hp.com> (raw)
In-Reply-To: <20061018212559.GA2965@sgi.com>

Russ,

On Wed, Oct 18, 2006 at 05:38:43PM -0500, Russ Anderson wrote:
> > With the existing perfmon v2.0, All the PMU description tables are compiled in.
> > 
> > I think what we could do is to detect we have a mixed (family) configuration
> > and drop to the generic (architected) PMU with only 4 counters and 2 events. That
> > is, I am afraid, the best we could do.
> 
> Tony's test kernel (plus Jack's patch and my patch) boots on a mixed Montecito
> and Madison system.  Perfmon runs, though I'm not sure what to look for
> to tell if it is not functioning properly.
> 
> 
Yes, it could work for very simple measurements. The CPU_CYCLES is a good example, though
the event on Montecito as a different name (by same encoding). But it gets more tricky as soon
as you try accessing PMU registers outside the range of architected registers, i.e., outside
PMC4-7/PMD4-7. There there are big differences. Montecito has 12 counters, Madison has 4.
All the extended features, such as opcode matching, range restrictions use differnet registers
between the 2 models.

Perfmon detects the cpu type using cpuid only once during initialization. So it depends
on which CPU executes the initialization. The only common set guaranteed to work the same
way is PMC4-7/PMD4-7 and events CPU_CYCLES and INSTRUCTION_RETIRED.

> ---------------------
> saturn2-7:~ # profile.pl --kernel-only -T 10
> profile.pl: found pfmon version 3.0.
> profile.pl: run profile for 10 seconds.
> profile.pl: no_dplace=1....c_opt=.
> profile.pl: Samples/tick defaults to: 13940008 for event CPU_CYCLES.
> profile.pl: pfmon command: /usr/bin/pfmon --system-wide --smpl-outfile=/tmp/sample.out.4022 --smpl-entries\x100000  -k --short-smpl-periods\x13940008 --smpl-module=compact-ia64 --events=CPU_CYCLES --relative  -t 10
> profile.pl: Running a timed profile for 10 seconds:
> <session to end in 10 seconds>
> profile.pl: Profile complete.
> profile.pl: Checking the profile results.
> profile.pl: Merging sample files into a single file.
> profile.pl: my_partition_id=0 makemap_partition_id=0.
> profile.pl: Running the profile analyzer.
> profile.pl: analyze.pl kernel_only /tmp/sample.out.4022 profile.out  --system-map /proc/kallsyms
> analyze,pl: Using /proc/kallsyms as the kernel map file.
> analyze.pl: Read 13679 symbols from /proc/kallsyms.
> analyze.pl: total observations: 1017
> profile.pl: Profile results are in file: profile.out.
> profile.pl: Removing the sample files.
> profile.pl: Normal exit.
> saturn2-7:~ # cat profile.out
> user ticks:             0               0 %
> kernel ticks:           1017            100 %
> idle ticks:             1015            99.8 %
> 
> Using /proc/kallsyms as the kernel map file.
> ==================================
>                            Kernel
> 
>       Ticks     Percent  Cumulative   Routine
>                           Percent
> --------------------------------------------------------------------
>        1015       99.80    99.80      default_idle
>           1        0.10    99.90      get_page_from_freelist
>           1        0.10   100.00      hrtimer_run_queues
> ==================================
> 
> 
> 
> -- 
> Russ Anderson, OS RAS/Partitioning Project Lead  
> SGI - Silicon Graphics Inc          rja@sgi.com

-- 

-Stephane

  parent reply	other threads:[~2006-10-18 22:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-18 21:25 [PATCH] - Fix get_model_name() for mixed cpu type systems Jack Steiner
2006-10-18 21:44 ` Stephane Eranian
2006-10-18 21:55 ` Jack Steiner
2006-10-18 22:25 ` Stephane Eranian
2006-10-18 22:38 ` Russ Anderson
2006-10-18 22:57 ` Stephane Eranian [this message]
2006-10-19  0:03 ` Luck, Tony
2006-10-19 14:08 ` Jack Steiner
2006-10-19 20:57 ` Russ Anderson
2006-10-19 21:05 ` Stephane Eranian
2006-10-19 21:21 ` Matthew Wilcox
2006-10-19 21:22 ` Luck, Tony
2006-10-19 21:29 ` Jack Steiner
2006-10-19 21:52 ` Stephane Eranian
2006-10-19 22:11 ` Stephane Eranian
2006-10-20  1:54 ` KAMEZAWA Hiroyuki
2006-10-20  2:03 ` Jack Steiner
2007-03-12 13:07 ` FW: " Jack Steiner

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=20061018225739.GF20590@frankl.hpl.hp.com \
    --to=eranian@hpl.hp.com \
    --cc=linux-ia64@vger.kernel.org \
    /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