[oe] [meta-oe][PATCH] Finer gperftools packaging

Anatol Belski anatol.oe at belski.net
Sun Jul 21 16:40:10 UTC 2019


Hi Khem,

thanks for the review. 

On Sat, 2019-07-20 at 19:17 -0700, Khem Raj wrote:
> Hi Anatol
> 
> On 7/20/19 6:33 PM, Anatol Belski via Openembedded-devel wrote:
> > This splits gperftools into
> > 
> > - gperftools script
> > - gperftools profiler and other libs
> > - libtcmalloc-minimal
> > - docs and other stuff
> > 
> > Especially the libctmalloc-minimal is what is useful if only an
> > improved
> > allocator needs to be used. The gperftools package stays otherwise
> > fully
> > backward compatible, as it depends on any necessary lib packages.
> > Though, the lib packages can be installed separately, which allows
> > for
> > more flexibility and for cleaner image contents.
> > 
> > Signed-off-by: Anatol Belski <anbelski at microsoft.com>
> > ---
> >   .../gperftools/gperftools_2.7.bb              | 23
> > +++++++++++++++++++
> >   1 file changed, 23 insertions(+)
> > 
> > diff --git a/meta-oe/recipes-support/gperftools/gperftools_2.7.bb
> > b/meta-oe/recipes-support/gperftools/gperftools_2.7.bb
> > index c8b91278d..badf0d203 100644
> > --- a/meta-oe/recipes-support/gperftools/gperftools_2.7.bb
> > +++ b/meta-oe/recipes-support/gperftools/gperftools_2.7.bb
> > @@ -28,3 +28,26 @@ COMPATIBLE_HOST_mipsarch_libc-glibc = "null"
> >   ARM_INSTRUCTION_SET_armv5 = "arm"
> >   ARM_INSTRUCTION_SET_toolchain-clang_arm = "arm"
> >   
> > +PACKAGES = "${PN} ${PN}-dbg ${PN}-doc ${PN}-libs ${PN}-libs-dev
> > ${PN}-libs-staticdev libtcmalloc-minimal"
> > +
> 
> some of these are default so instead of rewriting the variable 
> completely lets add/delete whatever is needed
> 
> PACKAGE_BREFORE_PN += "libtcmalloc-minimal ${PN}-libs"
> 
Good tip, i'm going to rewrite this based on this and other tips you
gave below, which will simplify a lot.

> > +EXTRA_OECONF_append += " --enable-static"
> > +
> 
> why do we need this ?
> > +FILES_${PN} = "${bindir}/*"
> > +FILES_${PN}-doc = "${docdir} ${mandir}"
> 
> we wont need these
> 
> > +FILES_${PN}-libs = "${libdir}/libprofiler*${SOLIBS}
> > ${libdir}/libprofiler*${SOLIBS}\
> > +		${libdir}/libtcmalloc${SOLIBS} \
> > +		${libdir}/libtcmalloc_debug${SOLIBS} \
> > +		${libdir}/libtcmalloc_and_profiler*${SOLIBS}"
> 
> do we need a separate libs package ? what does it give us ?
The point on this is a usual separation to allow libs to be used
separately from binaries. It was a kind of a "collateral improvement"
while being on it. Whereby in this case sure the pperf script is just a
175K perl script, so probably it's an overhead. So intsead, one would
have just libtcmalloc-minimal separated, as it sure a huge win for C++
apps, and otherwise let gperftools and gperftools-[static]dev handle
the rest. Would this be a better approach?

Thanks

Anatol

> > +FILES_${PN}-libs-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV}
> > ${libdir}/lib*.la ${libdir}/pkgconfig"
> > +FILES_${PN}-libs-staticdev = "${libdir}/*.a"
> 
> not needed
> > +FILES_libtcmalloc-minimal =
> > "${libdir}/libtcmalloc_minimal*${SOLIBS}
> > ${libdir}/libtcmalloc_minimal_debug*${SOLIBS}"
> > +
> > +RDEPENDS_${PN} = "${PN}-libs (= ${EXTENDPKGV})"
> > +RDEPENDS_${PN}-libs = "libtcmalloc-minimal (= ${EXTENDPKGV})"
> > +RDEPENDS_${PN}-libs-dev = "${PN}-libs (= ${EXTENDPKGV})
> > libtcmalloc-minimal (= ${EXTENDPKGV})"
> > +RDEPENDS_${PN}-libs-staticdev = "${PN}-libs-dev (= ${EXTENDPKGV})"
> > +
> > +SECTION_${$PN}-doc = "doc"
> > +SECTION_${PN}-libs-dev = "devel"
> > +SECTION_${PN}-libs-staticdev = "devel"
> > +



More information about the Openembedded-devel mailing list