Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

VxWorks interrupt source

212 views
Skip to first unread message

autstspe

unread,
Jul 26, 2006, 2:56:51 PM7/26/06
to
Hi:

I'm trying to find what thread or task is handling an interrupt in
VxWorks. I have two boards in a VME chassis. One board is pumping
messages to the other. At low message rates, when I do an "spy"
command on the board receiving the messages, I get the following -

total % (ticks) delta % (ticks)
KERNEL 0% (0) 0% (0)
INTERRUPT 0% (4) 0% (4)
IDLE 0% (0) 0% (0)
TOTAL 98% (499) 98% (499)

When I turn up the message rate, INTERRUPT jumps to 25% of the total
processor usage -

INTERRUPT 25% (2385) 23% (125)

There are about 20 user threads running on the receiving board. I'm
guessing that the high message rate causes the increase in INTERRUPT
processing. I would like to know which of the 20 threads is handling
the interrupt. I can't rebuild any of the software tasks (execpt my
own) to put debugging information in and don't have access to
emulators/logic analyzers.

1) Is there a simple way I can figure out which thread is handling the
interrupts?

2) Am I right in guessing the INTERRUPT line of the "spy" command
represents the percentage of processor time VxWorks is taking handling
the interrupt?

Thanks,

Mark

LarryC

unread,
Aug 3, 2006, 11:18:17 AM8/3/06
to
Mark:

Some BSP have a function sysIsrShow that you can use in the shell. It
prints the IRQ# and a list of ISRs that will get called. It will show
the name of the function if it exists.

The ISR processing varies in each BSP, but generally, there is a struct
that's recorded for each intConnect, that is linked with each new
intConnect call, and there is an overall array of head pts for each
IRQ.

Some BSP have it and some don't, and becauase it's a BSP function, it's
pretty BSP and architecture dependent.

Here's one for a PPC from a generic BSP from Moto...

/*******************************************************************************
*
* sysIsrShow - show installed ISRs
*
* This routine displays the interrupt vector tables used by the local
and VMEbus
* interrupt dispatchers.
*
* RETURNS: N/A
*
* NOMANUAL
*/

void sysIsrShow(void)
{
int vec;
INTR_HANDLER *handler;
char *name;
int value;
SYM_TYPE type;

if ((name = malloc (100)) == NULL)
{
printf ("\nCannot allocate memory\n");
return;
}

printf ("\nInstalled Interrupts:");

for (vec = 0; vec < NUM_VEC_MAX; vec++)
{
handler = &intrVecTable[vec];

if (
((int)handler->vec != (int)(defaultIntHandler)) &&
(handler->vec != NULL) &&
(1)
)
{
printf ("\nvector %2d: ",vec);

/* display function */
if ((symFindByValue (sysSymTbl, (UINT)handler->vec, name, &value,
&type) == ERROR) ||
(value != (int)handler->vec))
{
printf ("%08x(",(UINT)handler->vec);
}
else
{
printf ("%s(", name);
}

/* display argument */
if ((symFindByValue (sysSymTbl, (UINT)handler->arg, name, &value,
&type) == ERROR) ||
(value != (int)handler->arg))
{
printf ("%08x) ",handler->arg);
}
else
{
printf ("%s) ", name);
}

}
}

printf ("\n\n");

free (name);

0 new messages