* linux perf_4.19 @ 2019-07-02 11:30 srinuvasanasv 2019-07-02 11:38 ` Jan Kiszka 0 siblings, 1 reply; 4+ messages in thread From: srinuvasanasv @ 2019-07-02 11:30 UTC (permalink / raw) To: isar-users [-- Attachment #1.1: Type: text/plain, Size: 145 bytes --] Hi All, We need to support perf tool in linux-cip 4.19 kernel, Is it available perf_4.19 in ISAR? Many thanks, srinuvasan.A [-- Attachment #1.2: Type: text/html, Size: 246 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux perf_4.19 2019-07-02 11:30 linux perf_4.19 srinuvasanasv @ 2019-07-02 11:38 ` Jan Kiszka 2019-07-02 12:14 ` chombourger 0 siblings, 1 reply; 4+ messages in thread From: Jan Kiszka @ 2019-07-02 11:38 UTC (permalink / raw) To: srinuvasanasv, isar-users On 02.07.19 13:30, srinuvasanasv@gmail.com wrote: > Hi All, > > We need to support perf tool in linux-cip 4.19 kernel, Is it > available perf_4.19 in ISAR? > Let's start differently: - describe the problem you are facing (Debian perf vs. perf from custom kernels) - describe your current downstream approach to resolve that (ideally with code) - ask for feedback / suggestions how to address that in Isar generically Jan -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux perf_4.19 2019-07-02 11:38 ` Jan Kiszka @ 2019-07-02 12:14 ` chombourger 2019-07-02 17:31 ` Jan Kiszka 0 siblings, 1 reply; 4+ messages in thread From: chombourger @ 2019-07-02 12:14 UTC (permalink / raw) To: isar-users [-- Attachment #1.1: Type: text/plain, Size: 4310 bytes --] I do have a kernel patch to make builddep produce a debian package for perf I however need to clean it up before I submit it upstream. Consider the inline patch below as RFC (tested on 4.14 and 4.19). My worry is around the hard-coded Depends (tested OK on Debian 9) Just did not get around to finalize it - sorry Index: linux-4.14.71/scripts/package/builddeb =================================================================== --- linux-4.14.71.orig/scripts/package/builddeb +++ linux-4.14.71/scripts/package/builddeb @@ -90,12 +90,23 @@ if [ -n "$KDEB_PKGVERSION" ]; then else packageversion=$version-$revision fi +perf_kver="${version%%-*}" +case "$perf_kver" in + *.*.*) + perf_kver="${perf_kver%.*}" + ;; +esac sourcename=$KDEB_SOURCENAME tmpdir="$objtree/debian/tmp" kernel_headers_dir="$objtree/debian/hdrtmp" libc_headers_dir="$objtree/debian/headertmp" dbg_dir="$objtree/debian/dbgtmp" packagename=linux-image-$version +perf_dir="$objtree/debian/perf-$perf_kver-tmp" +meta_perf_dir="$objtree/debian/perftmp" +perf_packagename=linux-perf-$perf_kver +meta_perf_packagename=linux-perf +dbg_dir="$objtree/debian/dbgtmp" kernel_headers_packagename=linux-headers-$version libc_headers_packagename=linux-libc-dev dbg_packagename=$packagename-dbg @@ -125,6 +136,7 @@ BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_IN # Setup the directory structure rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" $objtree/debian/files +rm -rf "$meta_perf_dir" "$perf_dir" mkdir -m 755 -p "$tmpdir/DEBIAN" mkdir -p "$tmpdir/lib" "$tmpdir/boot" mkdir -p "$kernel_headers_dir/lib/modules/$version/" @@ -177,6 +189,21 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_ fi fi +mkdir -p $perf_dir +$MAKE -C tools/perf -f Makefile.perf \ + DESTDIR="$(readlink -f $perf_dir)" \ + srctree=$(pwd) \ + LDFLAGS= \ + prefix=/usr \ + perfexecdir=lib/perf_$perf_kver-core \ + install +mv $perf_dir/usr/bin/perf $perf_dir/usr/bin/perf_$perf_kver +rm -f $perf_dir/usr/bin/trace +for p in $perf_dir/usr/bin/perf-*; do + [ -f $p ] || continue + mv $p $perf_dir/usr/lib/perf_$perf_kver-core/ +done + if [ "$ARCH" != "um" ]; then $MAKE headers_check KBUILD_SRC= $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr" @@ -352,12 +379,35 @@ Description: Linux support headers for u are used by the installed headers for GNU glibc and other system libraries. EOF +cat <<EOF >> debian/control + +Package: $meta_perf_packagename +Section: devel +Architecture: all +Depends: $perf_packagename +Description: Performance analysis tools for Linux (meta-package) + This package depends on the package containing the 'perf' performance analysis + tools for the latest Linux kernel. + +Package: $perf_packagename +Section: devel +Architecture: any +Depends: libunwind8, libperl5.24, libpython2.7, binutils, libnuma1 +Description: Performance analysis tools for Linux $KERNELRELEASE + This package contains the 'perf' performance analysis tools for Linux kernel + version $KERNELRELEASE +EOF + if [ "$ARCH" != "um" ]; then create_package "$kernel_headers_packagename" "$kernel_headers_dir" create_package "$libc_headers_packagename" "$libc_headers_dir" fi create_package "$packagename" "$tmpdir" +create_package "$perf_packagename" "$perf_dir" + +forcearch="-DArchitecture=all" \ +create_package "$meta_perf_packagename" "$meta_perf_dir" if [ -n "$BUILD_DEBUG" ] ; then # Build debug package On Tuesday, July 2, 2019 at 1:38:03 PM UTC+2, Jan Kiszka wrote: > > On 02.07.19 13:30, srinuv...@gmail.com <javascript:> wrote: > > Hi All, > > > > We need to support perf tool in linux-cip 4.19 kernel, > Is it > > available perf_4.19 in ISAR? > > > > Let's start differently: > > - describe the problem you are facing (Debian perf vs. perf from custom > kernels) > - describe your current downstream approach to resolve that (ideally > with code) > - ask for feedback / suggestions how to address that in Isar generically > > Jan > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux > [-- Attachment #1.2: Type: text/html, Size: 6360 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux perf_4.19 2019-07-02 12:14 ` chombourger @ 2019-07-02 17:31 ` Jan Kiszka 0 siblings, 0 replies; 4+ messages in thread From: Jan Kiszka @ 2019-07-02 17:31 UTC (permalink / raw) To: chombourger, isar-users On 02.07.19 14:14, chombourger@gmail.com wrote: > I do have a kernel patch to make builddep produce a debian package for perf > > I however need to clean it up before I submit it upstream. Consider the inline > patch below as RFC > (tested on 4.14 and 4.19). My worry is around the hard-coded Depends (tested OK > on Debian 9) > > Just did not get around to finalize it - sorry Sound like a plan. That package will then act as a drop-in replacement for the Debian's perf package, right? And perf is backward compatible to older kernel version, right? Asking because of the linux-libc-dev version check we already have in linux-custom.inc. Jan > > Index: linux-4.14.71/scripts/package/builddeb > =================================================================== > --- linux-4.14.71.orig/scripts/package/builddeb > +++ linux-4.14.71/scripts/package/builddeb > @@ -90,12 +90,23 @@ if [ -n "$KDEB_PKGVERSION" ]; then > else > packageversion=$version-$revision > fi > +perf_kver="${version%%-*}" > +case "$perf_kver" in > + *.*.*) > + perf_kver="${perf_kver%.*}" > + ;; > +esac > sourcename=$KDEB_SOURCENAME > tmpdir="$objtree/debian/tmp" > kernel_headers_dir="$objtree/debian/hdrtmp" > libc_headers_dir="$objtree/debian/headertmp" > dbg_dir="$objtree/debian/dbgtmp" > packagename=linux-image-$version > +perf_dir="$objtree/debian/perf-$perf_kver-tmp" > +meta_perf_dir="$objtree/debian/perftmp" > +perf_packagename=linux-perf-$perf_kver > +meta_perf_packagename=linux-perf > +dbg_dir="$objtree/debian/dbgtmp" > kernel_headers_packagename=linux-headers-$version > libc_headers_packagename=linux-libc-dev > dbg_packagename=$packagename-dbg > @@ -125,6 +136,7 @@ BUILD_DEBUG="$(grep -s '^CONFIG_DEBUG_IN > > # Setup the directory structure > rm -rf "$tmpdir" "$kernel_headers_dir" "$libc_headers_dir" "$dbg_dir" > $objtree/debian/files > +rm -rf "$meta_perf_dir" "$perf_dir" > mkdir -m 755 -p "$tmpdir/DEBIAN" > mkdir -p "$tmpdir/lib" "$tmpdir/boot" > mkdir -p "$kernel_headers_dir/lib/modules/$version/" > @@ -177,6 +189,21 @@ if grep -q '^CONFIG_MODULES=y' $KCONFIG_ > fi > fi > +mkdir -p $perf_dir > +$MAKE -C tools/perf -f Makefile.perf \ > + DESTDIR="$(readlink -f $perf_dir)" \ > + srctree=$(pwd) \ > + LDFLAGS= \ > + prefix=/usr \ > + perfexecdir=lib/perf_$perf_kver-core \ > + install > +mv $perf_dir/usr/bin/perf $perf_dir/usr/bin/perf_$perf_kver > +rm -f $perf_dir/usr/bin/trace > +for p in $perf_dir/usr/bin/perf-*; do > + [ -f $p ] || continue > + mv $p $perf_dir/usr/lib/perf_$perf_kver-core/ > +done > + > if [ "$ARCH" != "um" ]; then > $MAKE headers_check KBUILD_SRC= > $MAKE headers_install KBUILD_SRC= INSTALL_HDR_PATH="$libc_headers_dir/usr" > @@ -352,12 +379,35 @@ Description: Linux support headers for u > are used by the installed headers for GNU glibc and other system libraries. > EOF > > +cat <<EOF >> debian/control > + > +Package: $meta_perf_packagename > +Section: devel > +Architecture: all > +Depends: $perf_packagename > +Description: Performance analysis tools for Linux (meta-package) > + This package depends on the package containing the 'perf' performance analysis > + tools for the latest Linux kernel. > + > +Package: $perf_packagename > +Section: devel > +Architecture: any > +Depends: libunwind8, libperl5.24, libpython2.7, binutils, libnuma1 > +Description: Performance analysis tools for Linux $KERNELRELEASE > + This package contains the 'perf' performance analysis tools for Linux kernel > + version $KERNELRELEASE > +EOF > + > if [ "$ARCH" != "um" ]; then > create_package "$kernel_headers_packagename" "$kernel_headers_dir" > create_package "$libc_headers_packagename" "$libc_headers_dir" > fi > > create_package "$packagename" "$tmpdir" > +create_package "$perf_packagename" "$perf_dir" > + > +forcearch="-DArchitecture=all" \ > +create_package "$meta_perf_packagename" "$meta_perf_dir" > > if [ -n "$BUILD_DEBUG" ] ; then > # Build debug package > > On Tuesday, July 2, 2019 at 1:38:03 PM UTC+2, Jan Kiszka wrote: > > On 02.07.19 13:30, srinuv...@gmail.com <javascript:> wrote: > > Hi All, > > > > We need to support perf tool in linux-cip 4.19 kernel, Is it > > available perf_4.19 in ISAR? > > > > Let's start differently: > > - describe the problem you are facing (Debian perf vs. perf from custom > kernels) > - describe your current downstream approach to resolve that (ideally > with code) > - ask for feedback / suggestions how to address that in Isar generically > > Jan > > -- > Siemens AG, Corporate Technology, CT RDA IOT SES-DE > Corporate Competence Center Embedded Linux > > -- > You received this message because you are subscribed to the Google Groups > "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to isar-users+unsubscribe@googlegroups.com > <mailto:isar-users+unsubscribe@googlegroups.com>. > To post to this group, send email to isar-users@googlegroups.com > <mailto:isar-users@googlegroups.com>. > To view this discussion on the web visit > https://groups.google.com/d/msgid/isar-users/45064917-b93a-4cb7-80dd-833f192bde19%40googlegroups.com > <https://groups.google.com/d/msgid/isar-users/45064917-b93a-4cb7-80dd-833f192bde19%40googlegroups.com?utm_medium=email&utm_source=footer>. > For more options, visit https://groups.google.com/d/optout. -- Siemens AG, Corporate Technology, CT RDA IOT SES-DE Corporate Competence Center Embedded Linux ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-07-02 17:31 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-07-02 11:30 linux perf_4.19 srinuvasanasv 2019-07-02 11:38 ` Jan Kiszka 2019-07-02 12:14 ` chombourger 2019-07-02 17:31 ` Jan Kiszka
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox