[Top] [All Lists]

Re: about oprofile callgraph on linux-mips

To: "Amker.Cheng" <>
Subject: Re: about oprofile callgraph on linux-mips
From: David Daney <>
Date: Tue, 18 Jan 2011 10:18:55 -0800
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 01/17/2011 07:01 PM, Amker.Cheng wrote:
     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 If you search for it you might find it.

David Daney

<Prev in Thread] Current Thread [Next in Thread>