[Crash-utility] [PATCH] crash extension: trace
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Mon Mar 22 08:41:45 UTC 2021
Hi Wengang,
I've cc'd Hatayama-san, the maintainer of trace.c, just in case.
https://crash-utility.github.io/extensions.html#TRACE
Please wait for his response.
(The extensions/trace.c was moved to a separate repository
https://github.com/fujitsu/crash-trace and will be removed from
the crash repository soon.)
Thanks,
Kazu
-----Original Message-----
> Since I am not in the mailing list, reply to me pls.
>
> > On Mar 16, 2021, at 2:22 PM, Wengang Wang <wen.gang.wang at oracle.com> wrote:
> >
> > From a UEK5 vmcore, I see that
> >
> > crash> p &__start___trace_bprintk_fmt
> > $1 = (const char *(*)[]) 0xffffffffa163f1d0
> > crash> p &__stop___trace_bprintk_fmt
> > $2 = (const char *(*)[]) 0xffffffffa163f1f0
> >
> > so (0xffffffffa163f1f0 - 0xffffffffa163f1d0)/8 = 4.
> >
> > there are two zero addresses at index 2 and 3.
> > crash> rd __start___trace_bprintk_fmt 4
> > ffffffffa163f1d0: ffffffffa11ccdca ffffffffa11ccdca ................
> > ffffffffa163f1e0: 0000000000000000 0000000000000000 ................
> >
> > current implementation will fail (no output for trace show command)
> > on seeing the zero addresses.
> >
> > fix: ignore zero addresses in add_print_address.
> >
> > tested to be good (compared the ftrace log from vmcore and that from live system).
> >
> > Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
> > ---
> > extensions/trace.c | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/extensions/trace.c b/extensions/trace.c
> > index c26b6c7..491e4eb 100644
> > --- a/extensions/trace.c
> > +++ b/extensions/trace.c
> > @@ -2226,6 +2226,8 @@ static int add_print_address(long address)
> > size_t len;
> > int i;
> >
> > + if (!address)
> > + return 0;
> > len = read_string(address, string, sizeof(string));
> > if (!len)
> > return -1;
> > --
> > 1.8.3.1
> >
>
>
> --
> Crash-utility mailing list
> Crash-utility at redhat.com
> https://listman.redhat.com/mailman/listinfo/crash-utility
More information about the Crash-utility
mailing list