A computer components & hardware forum. HardwareBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » HardwareBanter forum » Processors » Intel
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Performance Monitoring Hardware



 
 
Thread Tools Display Modes
  #1  
Old October 13th 04, 06:44 PM
Learner
external usenet poster
 
Posts: n/a
Default Performance Monitoring Hardware

Hi All,

I was interested in doing some profiling to figure out basic block
execution frequencies and branch biases. This is the typical
information that one would need to do several profile based
optimizations (PBO).

An instrumentation based approach instruments the software to collect
profiling information. However, I am interested in using the existing
Performance Monitoring Hardware to do this. I am interested in finding
the frequencies of basic-block execution and their branch biases. The
reason why I dislike software based instrumentation and profiling is:
* It could get slow.
* It could require modifying the binary.
* It could probably perturb other temporal behvaiour of the program.

Using hardware based profiling is just more "transparent".

Right now I am not completely sure how to do this using the existing
perf. monitoring hardware in Pentium or the Itanium systems. AFAIK it
seems like existing h/w does counting of events and I am not sure how
I can get for example basic block frequencies?

Question:
Could someone tell me how performance monitoring hardware can be used
for basic-block profiling?

Eventually I want to feedback this profile information of BB profiles
and branch biases to the compiler (I am thinking gcc) to do static
PBO. Does anyone know any existing compiler infrastructure which does
static PBO using performance monitoring hardware for profiling?

Thanks!
Learner,
  #2  
Old October 13th 04, 07:22 PM
Rick Jones
external usenet poster
 
Posts: n/a
Default

In comp.arch Learner wrote:
Eventually I want to feedback this profile information of BB profiles
and branch biases to the compiler (I am thinking gcc) to do static
PBO. Does anyone know any existing compiler infrastructure which does
static PBO using performance monitoring hardware for profiling?


It is possible that the Caliper tool for HP-UX/IPF does this for PBO
in the HP compilers. I cannot recall precisely if it is using the
Itanium PMU for the PBO part or not though, hence the possible.

Some details might be found at http://www.hp.com/go/caliper

rick jones
--
Wisdom Teeth are impacted, people are affected by the effects of events.
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to raj in cup.hp.com but NOT BOTH...
  #3  
Old October 13th 04, 07:27 PM
Eric Gouriou
external usenet poster
 
Posts: n/a
Default

Learner wrote:
I was interested in doing some profiling to figure out basic block
execution frequencies and branch biases. This is the typical
information that one would need to do several profile based
optimizations (PBO).

An instrumentation based approach instruments the software to collect
profiling information. However, I am interested in using the existing
Performance Monitoring Hardware to do this. I am interested in finding
the frequencies of basic-block execution and their branch biases. The
reason why I dislike software based instrumentation and profiling is:
* It could get slow.
* It could require modifying the binary.
* It could probably perturb other temporal behvaiour of the program.

Using hardware based profiling is just more "transparent".

Right now I am not completely sure how to do this using the existing
perf. monitoring hardware in Pentium or the Itanium systems. AFAIK it
seems like existing h/w does counting of events and I am not sure how
I can get for example basic block frequencies?


On Itanium/Itanium2, setup the BTB to count all branches (or just
the taken ones if you have enough logic to infer the not-taken ones from
the taken), program BRANCH_EVENTS to overflow in one of the counting
PMD/PMC (4-7), and off you go.

That's pretty much what 'caliper branch_prediction ...' does.
URL:http://www.hp.com/go/hpcaliper
(currently only on HP-UX although ..., nah, I can't say that)

Note however that the PBO data generated by Caliper is collected
via 'precise' instrumentation (although dynamic instrumentation
of more-or-less unprepared binaries), although it can be completed
by some PMU data.

Question:
Could someone tell me how performance monitoring hardware can be used
for basic-block profiling?


See above.

On Linux Itanium, check Stephane Eranian's perfmon:
URL:http://www.hpl.hp.com/research/linux/perfmon/pfmon.php4

If you want something similar on HP-UX Itanium, feel free to contact me.
A similar API exists but is currently left undocumented as it is
still rapidly evolving.

Eventually I want to feedback this profile information of BB profiles
and branch biases to the compiler (I am thinking gcc) to do static
PBO. Does anyone know any existing compiler infrastructure which does
static PBO using performance monitoring hardware for profiling?


No comment.

Eric
  #4  
Old October 15th 04, 05:26 PM
David Kanter
external usenet poster
 
Posts: n/a
Default

(Learner) wrote in message . com...
Hi All,

I was interested in doing some profiling to figure out basic block
execution frequencies and branch biases. This is the typical
information that one would need to do several profile based
optimizations (PBO).

An instrumentation based approach instruments the software to collect
profiling information. However, I am interested in using the existing
Performance Monitoring Hardware to do this. I am interested in finding
the frequencies of basic-block execution and their branch biases. The
reason why I dislike software based instrumentation and profiling is:
* It could get slow.
* It could require modifying the binary.
* It could probably perturb other temporal behvaiour of the program.


What do you mean by perturb? You think that PGO doesn't take into
account the impact that the monitoring has on instruction count etc.?

Using hardware based profiling is just more "transparent".

Right now I am not completely sure how to do this using the existing
perf. monitoring hardware in Pentium or the Itanium systems. AFAIK it
seems like existing h/w does counting of events and I am not sure how
I can get for example basic block frequencies?


One word: VTune (
http://www.intel.com/software/products/vtune/index.htm)

Now a note about VTune. You cannot count ALL branches, without being
just as slow as PGO. VTune uses sampling, which is fairly effective
(from what I hear and read) at getting accurate figures, but it isn't
as accurate as counting all branches. It is also much faster, perhaps
having overhead costs of 5%.

You should be able to count the number of branches and the number of
mispredicts, but I don't know if you can count taken vs. not taken.

Question:
Could someone tell me how performance monitoring hardware can be used
for basic-block profiling?


VTune has a feature called Call Graph Profiling which should do almost
exactly what you want. It's built into the application and is pretty
easy to do, esp. if you have the source code.

David
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PC components ::: A few hardware questions Robert TV General 1 August 24th 04 06:59 AM
hardware monitoring in bios.. David Ciemny Intel 0 April 20th 04 03:28 AM
P4P800 hardware monitoring in Linux Jim Shaffer, Jr. Asus Motherboards 1 December 24th 03 01:43 PM
Hardware Monitoring ASUS AS99127 Joust Asus Motherboards 4 December 7th 03 04:31 PM
DAW & Windows XP RAID Tips, ProTools error -9086 Giganews Asus Motherboards 0 October 24th 03 06:45 AM


All times are GMT +1. The time now is 07:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.