* question about ATOM, the alpha architecture analysis tool
@ 1995-11-29 5:00 Richard Fromm
1995-11-30 5:00 ` John Henning
1995-12-01 5:00 ` Greg Lueck Development Environment
0 siblings, 2 replies; 5+ messages in thread
From: Richard Fromm @ 1995-11-29 5:00 UTC (permalink / raw)
i'm not sure whether or not this is the right newsgroup for this, but i couldn't
find anything else that i thought was more relevant. if there is, please let
me know.
i have a few questions about using ATOM, the alpha architecture analysis tool.
1) if i just want to look at the static instruction code, and not the
dynamic execution stream, do i have any other choices than getting the whole
object with GetFirstObj and then grabbing the instruction array with
GetObjInstArray? it seems like the approach of grabbing procedures, and then
blocks within procedures, and then instructions within blocks is great for getting
the dynamic flow, but i'm not sure how to go about using those functions if i
just want to look at the instructions in the order that they're stored.
2) the problem with the above approach (using GetObjInstArray) is that it returns
an array of that is of type (int *), while all of the routines that operate on
individual instructions are expecting type (Inst *). is there any way around
this? what really is within the type (Inst *)? (i tried going thru the header
file cmplrs/atom.inst.h but couldn't figure it out) is there any way to caste
the data i get from GetObjInstArray to be used by the instruction parsing
routines (like GetInstInfo) which are all expecting (Inst *)?
- rich fromm
rfromm@cs.berkeley.edu
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rich Fromm 510-595-1074 home
494 Soda Hall 510-643-6228 work
Computer Science Division/EECS Dept. rfromm@cs.berkeley.edu
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about ATOM, the alpha architecture analysis tool
1995-11-29 5:00 question about ATOM, the alpha architecture analysis tool Richard Fromm
@ 1995-11-30 5:00 ` John Henning
1995-12-02 5:00 ` Dirk Grunwald
1995-12-01 5:00 ` Greg Lueck Development Environment
1 sibling, 1 reply; 5+ messages in thread
From: John Henning @ 1995-11-30 5:00 UTC (permalink / raw)
To: rfromm
I think Dirk Grunwald was talking about setting up an Atom User's
Group or mailing list a while back. You might ask him whether this
has been done.
http://www.cs.colorado.edu/~grunwald/Home.html or
grunwald@cs.colorado.edu
--
/John Henning
CSD Performance Group
Digital Equipment Corporation
Speaking for myself, not Digital
henning@zko.dec.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about ATOM, the alpha architecture analysis tool
1995-11-29 5:00 question about ATOM, the alpha architecture analysis tool Richard Fromm
1995-11-30 5:00 ` John Henning
@ 1995-12-01 5:00 ` Greg Lueck Development Environment
1 sibling, 0 replies; 5+ messages in thread
From: Greg Lueck Development Environment @ 1995-12-01 5:00 UTC (permalink / raw)
Rich,
This is as good a place as any to post Atom questions. I presume you
have a pre-release copy of the next Atom version since the interfaces
you ask about are not in the released version. Are you a Digital Unix
V4.0 field test site?
Atom tools consist of two parts, an instrumentation half and an analysis
half. The instrumentation half (the "*.inst.c" file) only has a static
view of the application. There are a number of navigation interfaces,
some of which can be used to look at each instruction in the
application. The analysis half of an Atom tool contains routines that
are invoked while the application runs. These routines can be used to
gather dynamic information about the application. If you just want to
statically analyze the application, you just need to write the
instrumentation half of the tool.
Here's a simple example that looks at every instruction in the
application:
#include <cmplrs/atom.inst.h>
Instrument(int iargc, char ** iargv, Obj *o)
{
Proc * p;
Block * b;
Inst * i;
for (p = GetFirstObjProc(o); p; p = GetNextProc(p)) {
for (b = GetFirstBlock(p); b; b = GetNextBlock(b)) {
for (i = GetFirstInst(b); i; i = GetNextInst(i)) {
if (GetInstClass(i) == ClassLoad) {
printf("Load instruction at 0x%lx\n", InstPC(i));
}
}
}
}
}
This traverses the procedures, basic blocks, and instructions in the
order that they appear in the application. The order is not the dynamic
execution order.
If you prefer to see the raw bit patterns for the instructions, you can
use the GetObjInstArray() interface. However, there is no way to
convert a single raw instruction to an "Inst *". You can get some
information from raw instructions by casting to the "union alpha_instruction"
type defined in <alpha/inst.h>. This allows you to pick out the opcode,
register fields, etc.
The "Inst *" type defined in <cmplrs/atom.inst.h> is intentionally left
as a pointer to an opaque structure. This allows Atom's internal
definition of an "Inst" to change without affecting compatibility with
existing Atom tools.
Hope this helps.
--
-------------------------------------------------------------------------------
Greg Lueck Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
--
-------------------------------------------------------------------------------
Greg Lueck Opinions expressed herein are my own.
lueck@zk3.dec.com
-------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about ATOM, the alpha architecture analysis tool
1995-11-30 5:00 ` John Henning
@ 1995-12-02 5:00 ` Dirk Grunwald
1995-12-03 5:00 ` John Henning
0 siblings, 1 reply; 5+ messages in thread
From: Dirk Grunwald @ 1995-12-02 5:00 UTC (permalink / raw)
>>>>> "JH" == John Henning <i4get@ix.netcom.com> writes:
In article <49j5km$mag@cloner3.netcom.com> John Henning <i4get@ix.netcom.com> writes:
JH> I think Dirk Grunwald was talking about setting up an Atom User's
JH> Group or mailing list a while back. You might ask him whether this
JH> has been done.
--
Yes, problem is I'm still planning!
However, I have put one or two packages on the web & was going to
announce it after this semester ended. Too much to do before then.
I was going to put the following sample atom packages (all very simple,
but all very useful).
(1) report cache misses by source line (ala mtool)
(2) report flops by source line
(3) report cache misses & info by cache lines (takes more
explaining why that's useful & how to use it
to tune code)
(4) A tool to identiy un-aligned loads by source line
(5) procedure tracing tool (using RPCC)
All the code is there, its juts a question of documenting & HTML'ing.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: question about ATOM, the alpha architecture analysis tool
1995-12-02 5:00 ` Dirk Grunwald
@ 1995-12-03 5:00 ` John Henning
0 siblings, 0 replies; 5+ messages in thread
From: John Henning @ 1995-12-03 5:00 UTC (permalink / raw)
Hi Dirk,
Sorry if I "pre-announced" your Atom work! But I do hope you'll
share what you have, since the last time I saw a REALLY nifty Atom
tool the shy (Digital) engineer who had done it was not willing to
release it, on the grounds that it was incomplete.
I'm hoping that less formal channels will come into existence,
where tool authors will feel less obligated to dot every t
and cross every eye. Maybe an ftp site or a mailing list
if they are easier than web-ifying your tools?
Thanks for considering this...
/John Henning
CSD Performance Group
Digital Equipment Corporation
Speaking for myself, not Digital
henning@zko.dec.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1995-12-03 5:00 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-11-29 5:00 question about ATOM, the alpha architecture analysis tool Richard Fromm
1995-11-30 5:00 ` John Henning
1995-12-02 5:00 ` Dirk Grunwald
1995-12-03 5:00 ` John Henning
1995-12-01 5:00 ` Greg Lueck Development Environment
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox