Prev: [PATCH] dynamic_debug: allow to set dynamic debug flags right at module load time
Next: [PATCH] writeback: fix non-integrity write-back
From: Avi Kivity on 29 May 2010 08:00 On 05/29/2010 12:45 AM, Steven Rostedt wrote: > On Fri, 2010-05-28 at 17:42 +0100, Stefan Hajnoczi wrote: > >> I get parse errors when using Steven Rostedt's trace-cmd tool, too. >> >> Any ideas what is going on here? I can provide more info (e.g. trace >> files) if necessary. >> > Does trace-cmd fail on the same tracepoints? Have you checkout the > latest code?. > > I do know it fails on some of the KVM tracerpoints since the formatting > they use is obnoxious. > > Isn't there a binary trace for this? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Steven Rostedt on 29 May 2010 09:30 On Sat, 2010-05-29 at 14:50 +0300, Avi Kivity wrote: > On 05/29/2010 12:45 AM, Steven Rostedt wrote: > > On Fri, 2010-05-28 at 17:42 +0100, Stefan Hajnoczi wrote: > > > >> I get parse errors when using Steven Rostedt's trace-cmd tool, too. > >> > >> Any ideas what is going on here? I can provide more info (e.g. trace > >> files) if necessary. > >> > > Does trace-cmd fail on the same tracepoints? Have you checkout the > > latest code?. > > > > I do know it fails on some of the KVM tracerpoints since the formatting > > they use is obnoxious. > > > > > > Isn't there a binary trace for this? > The pretty printing from the kernel handles this fine. But there's pressure to pass the format to userspace in binary and have the tool parse it. Currently it uses the print fmt to figure out how to parse. Using one of the examples that Stefan showed: kvmmmu/kvm_mmu_get_page: print fmt: "%s %s", ({ const char *ret = p->buffer + p->len; static const char *access_str[] = { "---", "--x", "w--", "w-x", "-u-", "-ux", "wu-", "wux" }; union kvm_mmu_page_role role; role.word = REC->role; trace_seq_printf(p, "sp gfn %llx %u%s q%u%s %s%s" " %snxe root %u %s%c", REC->gfn, role.level, role.cr4_pae ? " pae" : "", role.quadrant, role.direct ? " direct" : "", access_str[role.access], role.invalid ? " invalid" : "", role.nxe ? "" : "!", REC->root_count, REC->unsync ? "unsync" : "sync", 0); ret; }), REC->created ? "new" : "existing" You need a full C parser/interpreter to understand the above. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Avi Kivity on 30 May 2010 04:20 On 05/29/2010 04:19 PM, Steven Rostedt wrote: > On Sat, 2010-05-29 at 14:50 +0300, Avi Kivity wrote: > >> On 05/29/2010 12:45 AM, Steven Rostedt wrote: >> >>> On Fri, 2010-05-28 at 17:42 +0100, Stefan Hajnoczi wrote: >>> >>> >>>> I get parse errors when using Steven Rostedt's trace-cmd tool, too. >>>> >>>> Any ideas what is going on here? I can provide more info (e.g. trace >>>> files) if necessary. >>>> >>>> >>> Does trace-cmd fail on the same tracepoints? Have you checkout the >>> latest code?. >>> >>> I do know it fails on some of the KVM tracerpoints since the formatting >>> they use is obnoxious. >>> >>> >>> >> Isn't there a binary trace for this? >> >> > The pretty printing from the kernel handles this fine. But there's > pressure to pass the format to userspace in binary and have the tool > parse it. Currently it uses the print fmt to figure out how to parse. > > Using one of the examples that Stefan showed: > > kvmmmu/kvm_mmu_get_page: print fmt: "%s %s", ({ const char *ret = > p->buffer + p->len; static const char *access_str[] = { "---", "--x", > "w--", "w-x", "-u-", "-ux", "wu-", "wux" }; union kvm_mmu_page_role > role; role.word = REC->role; trace_seq_printf(p, "sp gfn %llx %u%s q%u%s > %s%s" " %snxe root %u %s%c", REC->gfn, role.level, role.cr4_pae ? " > pae" : "", role.quadrant, role.direct ? " direct" : "", > access_str[role.access], role.invalid ? " invalid" : "", role.nxe ? "" : > "!", REC->root_count, REC->unsync ? "unsync" : "sync", 0); ret; }), > REC->created ? "new" : "existing" > > > You need a full C parser/interpreter to understand the above. > Right. The tools can fall back to %x/%s based on the structure descriptor if they can't parse the format string. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Avi Kivity on 30 May 2010 10:10 On 05/30/2010 05:03 PM, Steven Rostedt wrote: > >> Right. The tools can fall back to %x/%s based on the structure >> descriptor if they can't parse the format string. >> >> > trace-cmd has plugin support to override how to read the format and > print it out. It now has the ability to write those plugins in python. > Cool. May make sense to use simpler formatting in the kernel, and use trace-cmd plugins for the complicated cases. It does raise issues with ABIs. Can trace-cmd read plugins from /lib/modules/*? We can then distribute the plugins with the kernel. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Steven Rostedt on 30 May 2010 10:10
On Sun, 2010-05-30 at 11:10 +0300, Avi Kivity wrote: > On 05/29/2010 04:19 PM, Steven Rostedt wrote: > > > The pretty printing from the kernel handles this fine. But there's > > pressure to pass the format to userspace in binary and have the tool > > parse it. Currently it uses the print fmt to figure out how to parse. > > > > Using one of the examples that Stefan showed: > > > > kvmmmu/kvm_mmu_get_page: print fmt: "%s %s", ({ const char *ret = > > p->buffer + p->len; static const char *access_str[] = { "---", "--x", > > "w--", "w-x", "-u-", "-ux", "wu-", "wux" }; union kvm_mmu_page_role > > role; role.word = REC->role; trace_seq_printf(p, "sp gfn %llx %u%s q%u%s > > %s%s" " %snxe root %u %s%c", REC->gfn, role.level, role.cr4_pae ? " > > pae" : "", role.quadrant, role.direct ? " direct" : "", > > access_str[role.access], role.invalid ? " invalid" : "", role.nxe ? "" : > > "!", REC->root_count, REC->unsync ? "unsync" : "sync", 0); ret; }), > > REC->created ? "new" : "existing" > > > > > > You need a full C parser/interpreter to understand the above. > > > > Right. The tools can fall back to %x/%s based on the structure > descriptor if they can't parse the format string. > trace-cmd has plugin support to override how to read the format and print it out. It now has the ability to write those plugins in python. -- Steve -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |