[dpdk-dev] [PATCH 3/3] eal: remove references to execinfo.h for musl
Dai, Wei
wei.dai at intel.com
Mon Mar 13 09:10:30 CET 2017
> -----Original Message-----
> From: jblunck at gmail.com [mailto:jblunck at gmail.com] On Behalf Of Jan Blunck
> Sent: Friday, March 10, 2017 10:50 PM
> To: Thomas Monjalon <thomas.monjalon at 6wind.com>
> Cc: Dai, Wei <wei.dai at intel.com>; dev <dev at dpdk.org>; Mcnamara, John
> <john.mcnamara at intel.com>; david.marchand at intel.com
> Subject: Re: [dpdk-dev] [PATCH 3/3] eal: remove references to execinfo.h for
> musl
>
> On Fri, Mar 10, 2017 at 1:40 PM, Thomas Monjalon
> <thomas.monjalon at 6wind.com> wrote:
> > 2017-03-10 19:58, Wei Dai:
> >> @@ -47,6 +50,7 @@
> >> /* dump the stack of the calling core */ void rte_dump_stack(void)
> >> {
> >> +#ifndef RTE_LIBC_MUSL
> >> void *func[BACKTRACE_SIZE];
> >> char **symb = NULL;
> >> int size;
> >> @@ -64,6 +68,7 @@ void rte_dump_stack(void)
> >> }
> >>
> >> free(symb);
> >> +#endif
> >> }
> >
> > There are probably other libc implementations not supporting this feature.
> > Instead of calling it "RTE_LIBC_MUSL", it should something like
> > "ENABLE_BACKTRACE".
> > Then you can add a musl section in the Linux quick start guide.
>
> Also I would improve the code readability by removing the preprocessor junk
> from it by moving the rte_dump_stack() function into eal_backtrace.c and make
> that conditionally compile based on CONFIG_ENABLE_BACKTRACE.
I'd like to change CONFIG_RTE_LIBC_MUSL to CONFIG_RTE_EAL_ENABLE_BACKTRACE and
Will send a v2 patch soon.
Anyway, you also still can move rte_dump_stack() to another file when my change is accepted.
More information about the dev
mailing list