Linux MIPS Architecture development
 help / color / mirror / Atom feed
* about oprofile callgraph on linux-mips
@ 2011-01-18  3:01 Amker.Cheng
  2011-01-18 18:18 ` David Daney
  0 siblings, 1 reply; 2+ messages in thread
From: Amker.Cheng @ 2011-01-18  3:01 UTC (permalink / raw)
  To: linux-mips

Hi,
    Previously I have run oprofile on linux-mips and have two
questions about it.
    It seems that oprofile does not support callgraph on linux-mips
currently, since there is no
backtrace function in oprofile kernel module for mips target.
    Is it possible or easy to support callgraph on mips target? If I
am right, it's some kind of
difficult to calculate stack frames of interrupted user space
programs, at least for O32 ABI.

Any tips would be appriciated. thanks.


-- 
Best Regards.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: about oprofile callgraph on linux-mips
  2011-01-18  3:01 about oprofile callgraph on linux-mips Amker.Cheng
@ 2011-01-18 18:18 ` David Daney
  0 siblings, 0 replies; 2+ messages in thread
From: David Daney @ 2011-01-18 18:18 UTC (permalink / raw)
  To: Amker.Cheng; +Cc: linux-mips

On 01/17/2011 07:01 PM, Amker.Cheng wrote:
> Hi,
>      Previously I have run oprofile on linux-mips and have two
> questions about it.
>      It seems that oprofile does not support callgraph on linux-mips
> currently, since there is no
> backtrace function in oprofile kernel module for mips target.
>      Is it possible or easy to support callgraph on mips target? If I
> am right, it's some kind of
> difficult to calculate stack frames of interrupted user space
> programs, at least for O32 ABI.
>

By default, most MIPS code doesn't use frame pointers.  This makes 
generating an accurate stack trace either very difficult or impossible.

If you compile *all* your user space code with -fno-omit-framepointer, 
you could write a fairly simple stack walker.  Otherwise you have to do 
code analysis to try to get a stack trace, and that is quite complex, 
and at in some cases impossible.

> Any tips would be appriciated. thanks.

I wrote a userspace o32 stack trace generator once and posted it to 
java-patches@gcc.gnu.org.  If you search for it you might find it.

David Daney

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-18 18:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-18  3:01 about oprofile callgraph on linux-mips Amker.Cheng
2011-01-18 18:18 ` David Daney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox