linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Karim Yaghmour <karym@opersys.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: ltrace for ppc
Date: Fri, 16 Feb 2001 19:22:39 -0500	[thread overview]
Message-ID: <3A8DC5A9.C52D3028@opersys.com> (raw)
In-Reply-To: 20010217000718.759BDDBA1B@atlas.valhalla.net


LTT doesn't need DProbes although it can interact with it.
The custom-event facility is proper to LTT, DProbes uses
it to log its events, but the information gathered by
LTT isn't gathered by means of DProbes. LTT can get the
information it has because the kernel is patched accordingly
to call on LTT upon the occurrence of crucial events.

Here's an excerpt from the exception handler on the PPC:
void
_exception(int signr, struct pt_regs *regs)
{
	if (!user_mode(regs))
	{
		show_regs(regs);
#if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
		debugger(regs);
#endif
		print_backtrace((unsigned long *)regs->gpr[1]);
		panic("Exception in kernel pc %lx signal %d",regs->nip,signr);
	}
	TRACE_TRAP_ENTRY(regs->trap, instruction_pointer(regs));
	force_sig(signr, current);
	TRACE_EVENT(TRACE_EV_TRAP_EXIT, NULL);
}

Notice the TRACE_TRAP_ENTRY statement. It is in fact a macro.
If you compile the kernel with trace support, then this will
result in a call to trace_event() which is a kernel-global entry
point for all events. Even then, the event may be ignored. This
will depend on whether a trace driver (provided with LTT) is
loaded or not. If it is loaded and registered with the
kernel trace facility, then events will be forwarded onto it.
Still, the events may be ignored by the trace driver if the
trace daemon hasn't opened the device and is waiting for a
signal from it. All this is to minimize intrusion on the kernel's
operation. If the kernel is compiled without trace support
then the macro results in no code at all.

Hence, you are correct, DProbes is for "i386 only" (although you
may be interested to know that I've spoken with the project
manager and they don't intend to keep this a ix86-specific thing.)
DProbes is interesting if you want to add tracepoints _dynamically_,
this LTT can't do. For LTT to operate, the tracepoints have to
be applied to the kernel's sources. (No need to say that I'd like
LTT to be part of the standard kernel sources as it isn't a
kernel debugger and is non-intrusive as to the normal behavior of
the kernel).

Note that PPC support is available in the 0.9.4preX series of LTT,
not in 0.9.3.

Best regards,

Karim

Iain Sandoe wrote:
>
> > It runs fine on my PowerBook. Give a try and let me know what you think.
>
> I'm missing something here... ibm's DProbe page says "i386 only" and their
> patch doesn't appear to have any ppc code...
>
> Iain.

--
===================================================
                 Karim Yaghmour
               karym@opersys.com
          Operating System Consultant
 (Linux kernel, real-time and distributed systems)
===================================================

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/

  reply	other threads:[~2001-02-17  0:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-17  0:07 ltrace for ppc Iain Sandoe
2001-02-17  0:22 ` Karim Yaghmour [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-02-16 23:45 Iain Sandoe
2001-02-16 23:16 Iain Sandoe
2001-02-16 21:10 Iain Sandoe
2001-02-16 22:47 ` Tony Mantler
2001-02-17 12:18   ` Anton Blanchard
2001-02-17 21:11     ` Thomas Graichen
2001-02-16 23:29 ` Karim Yaghmour
2001-02-13 21:10 Anton Blanchard
2001-02-15 17:48 ` Daniel Jacobowitz
2001-02-16 20:58   ` Karim Yaghmour

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A8DC5A9.C52D3028@opersys.com \
    --to=karym@opersys.com \
    --cc=iain@sandoe.co.uk \
    --cc=linuxppc-dev@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).