Re: MIPS RT debug support

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Tim Bird <tim.bird@...>
Cc: john cooper <john.cooper@...>, Thomas Gleixner <tglx@...>, linux kernel <linux-kernel@...>, Ingo Molnar <mingo@...>
Date: Thursday, November 15, 2007 - 9:00 pm

On Thu, 15 Nov 2007, Tim Bird wrote:


I'm not familiar with the KFT but I'm sure it would be easy to port
latency_trace to it. Really, all the mcount does is make a wrapper to pass
to the trace calls.

Here's the code for mcount in arch/x86/kernel/entry_64.S:

ENTRY(mcount)
	cmpl $0, mcount_enabled
	jz out

	push %rbp
	mov %rsp,%rbp

	push %r11
	push %r10
	push %r9
	push %r8
	push %rdi
	push %rsi
	push %rdx
	push %rcx
	push %rax

	mov 0x0(%rbp),%rax
	mov 0x8(%rbp),%rdi
	mov 0x8(%rax),%rsi

	call   __trace

	pop %rax
	pop %rcx
	pop %rdx
	pop %rsi
	pop %rdi
	pop %r8
	pop %r9
	pop %r10
	pop %r11

	pop %rbp
out:
	ret


Which simply passes to __trace the rip that jumped here, and (if possible)
the rip of that caller. The parent rip is not necessary.

 >

If the KFT could do the above, it should be trivial to adapt.

Hmm, if someone is willing to send me a free mips box, I may do it myself
;-)

-- Steve

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
MIPS RT debug support, Tim Bird, (Thu Nov 15, 7:31 pm)
Re: MIPS RT debug support, Steven Rostedt, (Thu Nov 15, 9:00 pm)
Re: MIPS RT debug support, john cooper, (Thu Nov 15, 9:55 pm)
Re: MIPS RT debug support, Steven Rostedt, (Thu Nov 15, 10:25 pm)
Re: MIPS RT debug support, john cooper, (Fri Nov 16, 7:56 am)