Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-30 Thread Jovi Zhangwei
On Mon, Mar 31, 2014 at 1:17 AM, Andi Kleen wrote: >> That's designed for portability initially, it means we can just run bytecode >> without compile script file everywhere, especially when compilation is >> a heavily task for some embedded platform, even though ktap compilation >> is extremely

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-30 Thread Andi Kleen
> That's designed for portability initially, it means we can just run bytecode > without compile script file everywhere, especially when compilation is > a heavily task for some embedded platform, even though ktap compilation > is extremely fast. > > I doubt maybe there will have this bytecode

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-30 Thread Jovi Zhangwei
On Sun, Mar 30, 2014 at 10:47 AM, Andi Kleen wrote: >> +/* Read debug info of a prototype. */ >> +static void bcread_dbg(BCReadCtx *ctx, ktap_proto_t *pt, int sizedbg) >> +{ >> + void *lineinfo = (void *)proto_lineinfo(pt); >> + >> + bcread_block(ctx, lineinfo, sizedbg); >> + /* Swap

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-30 Thread Jovi Zhangwei
On Sun, Mar 30, 2014 at 10:47 AM, Andi Kleen a...@firstfloor.org wrote: +/* Read debug info of a prototype. */ +static void bcread_dbg(BCReadCtx *ctx, ktap_proto_t *pt, int sizedbg) +{ + void *lineinfo = (void *)proto_lineinfo(pt); + + bcread_block(ctx, lineinfo, sizedbg); + /*

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-30 Thread Andi Kleen
That's designed for portability initially, it means we can just run bytecode without compile script file everywhere, especially when compilation is a heavily task for some embedded platform, even though ktap compilation is extremely fast. I doubt maybe there will have this bytecode

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-30 Thread Jovi Zhangwei
On Mon, Mar 31, 2014 at 1:17 AM, Andi Kleen a...@firstfloor.org wrote: That's designed for portability initially, it means we can just run bytecode without compile script file everywhere, especially when compilation is a heavily task for some embedded platform, even though ktap compilation is

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-29 Thread Andi Kleen
> +/* Read debug info of a prototype. */ > +static void bcread_dbg(BCReadCtx *ctx, ktap_proto_t *pt, int sizedbg) > +{ > + void *lineinfo = (void *)proto_lineinfo(pt); > + > + bcread_block(ctx, lineinfo, sizedbg); > + /* Swap lineinfo if the endianess differs. */ Why does this care

[PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-29 Thread Jovi Zhangwei
Exposed function: ktap_proto_t *kp_bcread(ktap_state_t *ks, unsigned char *buff, int len) Function kp_bcread read bytecode from buff, and return ktap top-level function prototype. Signed-off-by: Jovi Zhangwei --- kernel/trace/ktap/kp_bcread.c | 429 ++

[PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-29 Thread Jovi Zhangwei
Exposed function: ktap_proto_t *kp_bcread(ktap_state_t *ks, unsigned char *buff, int len) Function kp_bcread read bytecode from buff, and return ktap top-level function prototype. Signed-off-by: Jovi Zhangwei jovi.zhang...@gmail.com --- kernel/trace/ktap/kp_bcread.c | 429

Re: [PATCH v2 08/29] ktap: add bytecode reader(kernel/trace/ktap/kp_bcread.[c|h])

2014-03-29 Thread Andi Kleen
+/* Read debug info of a prototype. */ +static void bcread_dbg(BCReadCtx *ctx, ktap_proto_t *pt, int sizedbg) +{ + void *lineinfo = (void *)proto_lineinfo(pt); + + bcread_block(ctx, lineinfo, sizedbg); + /* Swap lineinfo if the endianess differs. */ Why does this care about