From: Don Slutz <dslutz@verizon.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
George Dunlap <george.dunlap@eu.citrix.com>,
Don Slutz <Don@CloudSwitch.com>,
Ian Jackson <ian.jackson@eu.citrix.com>,
Don Slutz <dslutz@verizon.com>,
xen-devel@lists.xen.org, Jan Beulich <JBeulich@suse.com>
Subject: Re: [PATCH v2 07/12] xenctx: Add stack addr to call trace.
Date: Thu, 7 Nov 2013 09:34:30 -0500 [thread overview]
Message-ID: <527BA4F6.6030804@terremark.com> (raw)
In-Reply-To: <1383828610.32399.32.camel@kazak.uk.xensource.com>
[-- Attachment #1.1: Type: text/plain, Size: 5656 bytes --]
On 11/07/13 07:50, Ian Campbell wrote:
> On Wed, 2013-11-06 at 15:08 -0500, Don Slutz wrote:
>> From: Don Slutz <Don@CloudSwitch.com>
> Can you give an example of the output please.
Here it is (With all patches active):
dcs-xen-54:~/xen>sudo
/home/don/xen/dist/install/usr/lib/xen/bin/xenctx -s
/boot/System.map-2.6.18-128.el5 2
rip: ffffffff8006b2b0 default_idle+0x29
flags: 00000246 i z p
rsp: ffffffff803ddf90
rax: 0000000000000000 rcx: 0000000000000000 rdx: 0000000000000000
rbx: ffffffff8006b287 rsi: 0000000000000001 rdi: ffffffff802f0658
rbp: 0000000000086800 r8: ffffffff803dc000 r9: 000000000000003f
r10: ffff81017d2437c0 r11: 0000000000000282 r12: 0000000000000000
r13: 0000000000000000 r14: 0000000000000000 r15: 0000000000000000
cs: 0010 @ 0000000000000000
/ffffffff(a9b)
ss: 0018 @ 0000000000000000
/ffffffff(c93)
ds: 0018 @ 0000000000000000
/ffffffff(c93)
es: 0018 @ 0000000000000000
/ffffffff(c93)
fs: 0000 @ 0000000000000000
/ffffffff(c00)
gs: 0000 @ ffffffff803ac000\0000000000000000 boot_cpu_pda\
/ffffffff(c00)
Code (instr addr ffffffff8006b2b0)
65 48 8b 04 25 10 00 00 00 8b 80 38 e0 ff ff a8 08 75 04 fb f4 <eb>
01 fb 65 48 8b 04 25 10 00 00
Stack:
ffffffff803ddf90: ffffffff80048d19 0000000000200800 .......... .....
ffffffff803ddfa0: ffffffff803e7801 0000000000086800 .x>......h......
ffffffff803ddfb0: 0000000000000000 ffffffff80430720 ........ .C.....
ffffffff803ddfc0: ffffffff803e722f 80008e000010019c /r>.............
ffffffff803ddfd0: 00000000ffffffff 0000000000000000 ................
ffffffff803ddfe0: 0000000000000000 0000000000200000 .......... .....
ffffffff803ddff0: 0000000000000000 0000000000000000 ................
Call Trace:
[<ffffffff8006b2b0>] default_idle+0x29 <--
ffffffff803ddf90: [<ffffffff80048d19>] cpu_idle+0x95
ffffffff803ddfa0: [<ffffffff803e7801>] start_kernel+0x220
ffffffff803ddfc0: [<ffffffff803e722f>] x86_64_start_kernel+0x22f
>
> What is "stack address" is it the base of the function's stack frame
> perhaps? Or maybe the top? Or maybe the framepointer?
It is the address of the stack "word".
>> Signed-off-by: Don Slutz <Don@CloudSwitch.com>
>> ---
>> tools/xentrace/xenctx.c | 20 ++++++++++++++------
>> 1 files changed, 14 insertions(+), 6 deletions(-)
>>
>> diff --git a/tools/xentrace/xenctx.c b/tools/xentrace/xenctx.c
>> index dcf431c..4dc6574 100644
>> --- a/tools/xentrace/xenctx.c
>> +++ b/tools/xentrace/xenctx.c
>> @@ -700,6 +700,9 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
>> printf("Stack Trace:\n");
>> else
>> printf("Call Trace:\n");
>> + printf("%s ", width == 8
>> + ? " "
>> + : " ");
> I think this can be done as ("%*s", width*2, "") or something roughly
> like that.
Will look into it.
-Don Slutz
>> printf("%c [<", xenctx.stack_trace ? '*' : ' ');
>> print_stack_word(instr_pointer(ctx), width);
>> printf(">]");
>> @@ -715,9 +718,10 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
>> p = map_page(ctx, vcpu, stack);
>> if (!p)
>> return -1;
>> - printf("| ");
>> + print_stack_word(stack, width);
>> + printf(": | ");
>> print_stack_word(read_stack_word(p, width), width);
>> - printf(" \n");
>> + printf("\n");
>> stack += width;
>> }
>> } else {
>> @@ -729,7 +733,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
>> return -1;
>> frame = read_stack_word(p, width);
>> if (xenctx.stack_trace) {
>> - printf("|-- ");
>> + print_stack_word(stack, width);
>> + printf(": |-- ");
>> print_stack_word(read_stack_word(p, width), width);
>> printf("\n");
>> }
>> @@ -740,7 +745,8 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
>> if (!p)
>> return -1;
>> word = read_stack_word(p, width);
>> - printf("%c [<", xenctx.stack_trace ? '|' : ' ');
>> + print_stack_word(stack, width);
>> + printf(": %c [<", xenctx.stack_trace ? '|' : ' ');
>> print_stack_word(word, width);
>> printf(">]");
>> print_symbol(word);
>> @@ -756,13 +762,15 @@ static int print_stack(vcpu_guest_context_any_t *ctx, int vcpu, int width)
>> return -1;
>> word = read_stack_word(p, width);
>> if (is_kernel_text(word)) {
>> - printf(" [<");
>> + print_stack_word(stack, width);
>> + printf(": [<");
>> print_stack_word(word, width);
>> printf(">]");
>> print_symbol(word);
>> printf("\n");
>> } else if (xenctx.stack_trace) {
>> - printf(" ");
>> + print_stack_word(stack, width);
>> + printf(": ");
>> print_stack_word(word, width);
>> printf("\n");
>> }
>
[-- Attachment #1.2: Type: text/html, Size: 7988 bytes --]
[-- Attachment #2: Type: text/plain, Size: 126 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-11-07 14:34 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 20:08 [PATCH v2 00/12] xenctx: Many changes Don Slutz
2013-11-06 20:08 ` [PATCH v2 01/12] xenctx: Clean up stack trace when hypercall_page not in symbol table Don Slutz
2013-11-07 8:07 ` Jan Beulich
2013-11-07 8:22 ` Ian Campbell
2013-11-07 8:47 ` Jan Beulich
2013-11-07 12:36 ` Ian Campbell
2013-11-07 13:28 ` Don Slutz
2013-11-07 12:38 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 02/12] xenctx: Add -2 (--two-pages) option to switch stack size to 8KiB Don Slutz
2013-11-07 8:04 ` Jan Beulich
2013-11-07 12:40 ` Ian Campbell
2013-11-07 15:24 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 03/12] xenctx: Output ascii version of stack also Don Slutz
2013-11-07 8:09 ` Jan Beulich
2013-11-07 12:43 ` Ian Campbell
2013-11-07 13:17 ` Jan Beulich
2013-11-07 13:21 ` Jan Beulich
2013-11-08 0:12 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 04/12] xenctx: Add stack address to dump, switch to 16 bytes per line Don Slutz
2013-11-07 8:12 ` Jan Beulich
2013-11-07 12:46 ` Ian Campbell
2013-11-08 0:13 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 05/12] xenctx: Change print_symbol to do the space before Don Slutz
2013-11-07 8:13 ` Jan Beulich
2013-11-07 12:47 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 06/12] xenctx: More info on failed to map page Don Slutz
2013-11-07 12:48 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 07/12] xenctx: Add stack addr to call trace Don Slutz
2013-11-07 12:50 ` Ian Campbell
2013-11-07 14:34 ` Don Slutz [this message]
2013-11-07 14:44 ` Ian Campbell
2013-11-07 15:06 ` Don Slutz
2013-11-07 16:03 ` Ian Campbell
2013-11-07 18:13 ` Don Slutz
2013-11-08 10:15 ` Ian Campbell
2013-11-06 20:08 ` [PATCH v2 08/12] xenctx: Add -d <daddr> option to dump memory at daddr as a stack Don Slutz
2013-11-07 8:22 ` Jan Beulich
2013-11-08 0:21 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 09/12] xenctx: Add -m <maddr> option to dump memory at maddr Don Slutz
2013-11-07 8:25 ` Jan Beulich
2013-11-08 0:24 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 10/12] xenctx: change is_kernel_text() into is_kernel_addr() Don Slutz
2013-11-07 8:35 ` Jan Beulich
2013-11-08 0:51 ` Don Slutz
2013-11-08 8:40 ` Jan Beulich
2013-11-08 9:50 ` Ian Campbell
2013-11-08 13:50 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 11/12] xenctx: Dump registers via hvm info if available Don Slutz
2013-11-06 20:35 ` Andrew Cooper
2013-11-07 18:56 ` Don Slutz
2013-11-08 10:13 ` Ian Campbell
2013-11-08 10:29 ` Andrew Cooper
2013-11-08 10:32 ` Ian Campbell
2013-11-07 8:38 ` Jan Beulich
2013-11-07 21:19 ` Don Slutz
2013-11-06 20:08 ` [PATCH v2 12/12] xenctx: Add optional fCPU Don Slutz
2013-11-07 8:40 ` Jan Beulich
2013-11-07 12:53 ` Ian Campbell
2013-11-07 21:24 ` Don Slutz
2013-11-08 11:29 ` [PATCH v2 00/12] xenctx: Many changes George Dunlap
2013-11-08 12:54 ` Ian Campbell
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=527BA4F6.6030804@terremark.com \
--to=dslutz@verizon.com \
--cc=Don@CloudSwitch.com \
--cc=Ian.Campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=george.dunlap@eu.citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.