Skip to contentSkip to conversation

ia64 dispersal analysis capability

DISCUSSION Jack Steiner 6 participants 9 messages Sep 21, 2005 – Sep 23, 2005

lore
Share & tools
lore
#0 lore raw

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump. Does anyone know what happened to the patch? Is there another tool that provides the same information?

I've found the tool very useful for providing insight into IA64 code scheduling.

Example:

4000000000002f60 <main>:

4000000000002f60:       00 40 39 14 80 05          0                 [MII]       alloc r40=ar.pfs,14,10,0
4000000000002f66:       40 02 00 00 42 c0          0                             mov r36=r0
4000000000002f6c:       01 0b 00 90                0                             addl r14H,r1
4000000000002f70:       01 30 81 03 04 24          0                 [MII]       addl r38`8,r1
4000000000002f76:       90 02 04 00 42 e0          1 R[I0,I1]                    mov r41=r1
4000000000002f7c:       04 00 c4 00                1                             mov r39°;;
4000000000002f80:       00 78 00 1c 18 10          2 S               [MII]       ld8 r15=[r14]
4000000000002f86:       e0 08 00 00 48 00          2                             mov r14=1
4000000000002f8c:       00 00 04 00                2                             nop.i 0x0
4000000000002f90:       0a 50 01 4c 18 10          2                 [MMI]       ld8 r42=[r38];;
4000000000002f96:       00 70 3c 20 23 00          5 S L[r15] L[r15]             st4 [r15]=r14
4000000000002f9c:       00 00 04 00                5                             nop.i 0x0
4000000000002fa0:       11 00 00 00 01 00          5                 [MIB]       nop.m 0x0
4000000000002fa6:       00 00 00 02 00 00          5                             nop.i 0x0
4000000000002fac:       c8 fd ff 58                5                             br.call.sptk.many b0@00000000002d60 <scaled_atol>;;
4000000000002fb0:       0b 08 00 52 00 21          6                 [MMI]       mov r1=r41;;
4000000000002fb6:       f0 40 06 0a 48 c0          7 S                           addl r15q2,r1
4000000000002fbc:       81 ed ef 9f                7                             addl r14=-552,r1;;
4000000000002fc0:       09 28 01 1e 00 21          8 S               [MMI]       mov r37=r15
4000000000002fc6:       30 02 38 00 42 00          8                             mov r35=r14
4000000000002fcc:       00 00 04 00                8                             nop.i 0x0;;
4000000000002fd0:       00 00 20 4a 98 11          9 S               [MII]       st8 [r37]=r8
4000000000002fd6:       00 00 00 02 00 00          9                             nop.i 0x0
4000000000002fdc:       00 00 04 00                9                             nop.i 0x0
4000000000002fe0:       00 50 01 40 00 21          9                 [MII]       mov r42=r32
4000000000002fe6:       b0 02 84 00 42 80         10 R[I0,I1]                    mov r43=r33
Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.
#1 lore raw
Quoted 8 lines · David Mosberger-Tang
Quoted 3 lines · Jack Steiner

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump. Does anyone know what happened to the patch? Is there another tool that provides the same information?

Yeah, a tool called Montecito! ;-)

Indeed.

Quoted 9 lines

I don't remember whether you were at the last Gelato meeting and whether you attended the PMU talk. If you didn't: I had some slides in there that showed how the IP-EAR can be used to get instruction-group issue traces which show you exactly how many stall-cycles there are between subsequent instruction-groups. Yes, that's a bit different from the static info you are looking for, but in many ways it's much better info, so it's real (measured) data and takes into affect all corner cases, including memory latency etc.

You can get the presentation at:

	http://www.gelato.org/pdf/may2005/gelato_may2005_profiling_eranian_callister.pdf
Signature · 1 line
-Stephane
#2 lore raw
In reply to Jack Steiner
Quoted 2 lines · Jack Steiner

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump.

That was a long time ago. :)

Quoted 1 line

Does anyone know what happened to the patch?

I think it may have died due to lack of interest. I'm not aware many folks like you that have actually been using it.

At the time, I obtained a FSF copyright assignment for the code at the request of one of the binutils maintainers. AFAIK the patch was never incorporated although I do not remember seeing any technical concerns from the binutils maintainers before I moved on to a different project.

Quoted 1 line

Is there another tool that provides the same information?

Not that I'm aware of.
The binutils patch was based on an earlier stand-alone utility that processed objdump -d output but that program lacked Itanium 2 support and several other improvements that I put in the binutils version. I can't remember very much about the code but I suspect that some of these changes would not have been adaptable to the stand-alone utility.

Quoted 3 lines

I've found the tool very useful for providing insight into IA64 code scheduling.

Thanks. We thought it might be useful to someone.

Gary

Signature · 5 lines
Gary Hade
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
[email protected]
http://www.ibm.com/linux/ltc
#3 lore raw
In reply to Jack Steiner
Quoted 6 lines · Gary Hade

At the time, I obtained a FSF copyright assignment for the code at the request of one of the binutils maintainers. AFAIK the patch was never incorporated although I do not remember seeing any technical concerns from the binutils maintainers before I moved on to a different project.

I searched the binutils mailing lists for "Gary Hade" and all I found was a ppc disassembler patch. Was it ever submitted to the binutils group? Maybe it was only submitted to some IA-64 list? If it only went to an IA-64 list, that may be part of the reason why it got dropped.

The other part of the reason is probably that there weren't any active IA-64 binutils developers at the time. I'm listed at the IA-64 maintainer, but there was a period in 2002-2003 before and after I left Red Hat where I could not do much IA-64 related work. Nowadays, we've got HJ at Intel who does quite a bit of IA-64 related binutils work.

#4 lore raw
In reply to Jack Steiner
Quoted 3 lines · Jack Steiner

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump. Does anyone know what happened to the patch? Is there another tool that provides the same information?

As for the "other tool" part of this question, you can get some info from gcc by using -fsched-verbose=2 -fdump-rtl-sched1 -fdump-rtl-mach. This will give you a lot of info about what the gcc instruction scheduler did, but the interesting stuff is in the "--> " lines in the *.mach file. This will give you lines like
;; 1--> 11 r14=[r14] :2_M_only_um01
which gives you the cycle number (1), the gcc internal instruction number (11), an abstract representation of what the instruction does (r14=[r14]), and the scheduling unit info (2_M_only_um01). The 2 stands for Itanium2. The M stands for a memory unit. The only_um01 means it must be scheduled to one of the first two memory units.

This info is to help gcc developers debug instruction scheduler related problems, and isn't really meant to be easily readable by end users, but you may find it useful.

Actually, the above command only works for gcc-4. For gcc-3, just use -fsched-verbose=2 -da and ignore the non-scheduler related dump files.

#5 lore raw
In reply to Jack Steiner
Quoted 3 lines · Jack Steiner

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump. Does anyone know what happened to the patch? Is there another tool that provides the same information?

Yeah, a tool called Montecito! ;-)

I don't remember whether you were at the last Gelato meeting and whether you attended the PMU talk. If you didn't: I had some slides in there that showed how the IP-EAR can be used to get instruction-group issue traces which show you exactly how many stall-cycles there are between subsequent instruction-groups. Yes, that's a bit different from the static info you are looking for, but in many ways it's much better info, so it's real (measured) data and takes into affect all corner cases, including memory latency etc.

--david
--
Mosberger Consulting LLC, voice/fax: 510-744-9372,
http://www.mosberger-consulting.com/
35706 Runckel Lane, Fremont, CA 94536

#6 lore raw
In reply to Jack Steiner
Quoted 7 lines · David Mosberger-Tang
Quoted 3 lines · Jack Steiner

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump. Does anyone know what happened to the patch? Is there another tool that provides the same information?

Yeah, a tool called Montecito! ;-)

Is montecito a free opensource tool :-)
Sorry...

Quoted 9 lines

I don't remember whether you were at the last Gelato meeting and whether you attended the PMU talk. If you didn't: I had some slides in there that showed how the IP-EAR can be used to get instruction-group issue traces which show you exactly how many stall-cycles there are between subsequent instruction-groups. Yes, that's a bit different from the static info you are looking for, but in many ways it's much better info, so it's real (measured) data and takes into affect all corner cases, including memory latency etc.

Yes, I was at the meeting but I had forgotten about the IP-EAR :-(

It looks like the IP-EAR will be useful in a lot of cases. However, a static analysis tool would also be useful. It would be nice to have both.

BTW, does the current version of pfmon support montecito? Are any perfmon.c kernel patches needed??

Quoted 6 lines

--david
--
Mosberger Consulting LLC, voice/fax: 510-744-9372,
http://www.mosberger-consulting.com/
35706 Runckel Lane, Fremont, CA 94536

Signature · 4 lines
Thanks

Jack Steiner ([email protected])          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.
#7 lore raw
In reply to Jack Steiner
Quoted 22 lines · Stephane Eranian
Quoted 8 lines · David Mosberger-Tang
Quoted 3 lines · Jack Steiner

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump. Does anyone know what happened to the patch? Is there another tool that provides the same information?

Yeah, a tool called Montecito! ;-)

Indeed.

Quoted 9 lines

I don't remember whether you were at the last Gelato meeting and whether you attended the PMU talk. If you didn't: I had some slides in there that showed how the IP-EAR can be used to get instruction-group issue traces which show you exactly how many stall-cycles there are between subsequent instruction-groups. Yes, that's a bit different from the static info you are looking for, but in many ways it's much better info, so it's real (measured) data and takes into affect all corner cases, including memory latency etc.

Quoted 2 lines

You can get the presentation at:

	http://www.gelato.org/pdf/may2005/gelato_may2005_profiling_eranian_callister.pdf

Good stuff.

One concern I had 3+ years ago when we proposed dispersal analysis inclusion in binutils was the likelyhood that the code would keep pace as the processor evolved. The number of users of such specialized functionality is obviously very small and I was skeptical that a subset of those users would also be interested in keeping the dispersal analysis code updated... especially if there were other analysis alternatives.

Gary

Signature · 5 lines
Gary Hade
IBM Linux Technology Center
503-578-4503  IBM T/L: 775-4503
[email protected]
http://www.ibm.com/linux/ltc
#8 lore raw
In reply to Jack Steiner
Quoted 4 lines · Jack Steiner
Quoted 4 lines

In 2002, Gary Hade posted a patch to binutils that added dispersal analysis to the output of objdump.

Is there another tool that provides the same information?

In my misspent days at HP, I developed a "tool" that would
postprocess objdump -d (and other disassemblers) and create Excel CVS files that showed the instruction dispatch. There were models for Merced (LOL) and McKinley/Madison; Montecito would be relatively easy to add.

I had to leave the code when I "left", so perhaps some brave
soul still at HP (Stephan?) could dig it up and release it, or make it public domain so that I could. Any interest out there?

Regards,
John Worley
[email protected]