Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.bugs.dist > #982154 > unrolled thread

Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events

Started bySudip Mukherjee <sudipm.mukherjee@gmail.com>
First post2019-11-04 22:50 +0100
Last post2019-12-25 13:10 +0100
Articles 9 — 2 participants

Back to article view | Back to linux.debian.bugs.dist


Contents

  Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2019-11-04 22:50 +0100
    Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Ben Hutchings <ben@decadent.org.uk> - 2019-11-08 21:10 +0100
      Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2019-11-10 22:40 +0100
        Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Ben Hutchings <ben@decadent.org.uk> - 2019-11-10 23:10 +0100
          Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2019-11-11 22:40 +0100
            Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Ben Hutchings <ben@decadent.org.uk> - 2019-11-12 03:50 +0100
              Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2019-11-15 12:50 +0100
                Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2019-12-08 01:30 +0100
                  Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2019-12-25 13:10 +0100

#982154 — Bug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2019-11-04 22:50 +0100
SubjectBug#944138: ITP: libtraceevent -- The libtraceevent library provides APIs to access kernel tracepoint events
Message-ID<yYSox-5Qx-3@gated-at.bofh.it>
Package: wnpp
Severity: wishlist
Owner: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
X-Debbugs-Cc: debian-devel@lists.debian.org, debian-kernel@lists.debian.org

* Package name    : libtraceevent
  Version         : 1.1.0
  Upstream Author : Steven Rostedt (VMware) <rostedt@goodmis.org>
* URL             : NA
* License         : GPL-2.0 and LGPL-2.1
  Programming Lang: C
  Description     : The libtraceevent library provides APIs to access kernel tracepoint events,
		    located in the tracefs file system under the events directory.

The kernel tracepoints are now being used by multiple packages like trace-cmd, perf, powertop, rasdaemon.
And all of them have duplicate codes in them to use the tracepoints. libtraceevent is planned to move all
the duplicate codes in a single library so that the duplicate code will be removed from the next versions
of these packages and they can depend on libtraceevent.

The code for libtracevent lives in the kernel tree at
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
And so, it will be great if kernel team will like to package and maintain it, if not, then I will
be happy to do it. But, if I am doing it then I will need a sponsor to upload it.

--
Regards
Sudip

[toc] | [next] | [standalone]


#982615

FromBen Hutchings <ben@decadent.org.uk>
Date2019-11-08 21:10 +0100
Message-ID<z0iJY-2bC-17@gated-at.bofh.it>
In reply to#982154

[Multipart message — attachments visible in raw view] — view raw

On Mon, 2019-11-04 at 21:44 +0000, Sudip Mukherjee wrote:
[...]
> The code for libtracevent lives in the kernel tree at
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
> And so, it will be great if kernel team will like to package and maintain it, if not, then I will
> be happy to do it. But, if I am doing it then I will need a sponsor to upload it.

If kernel.org's kernel source repository is the canonical location for
this code, not just a convenience copy, then the binary package should
be built from src:linux and not a separate source package.

I think src:linux already builds the library, but only as a static
library that's linked into perf.

I don't know exactly what changes you would need to make, but they
should be roughly along these lines:

1. Add debian/rules.d/tools/lib/traceevent/Makefile with a default
   target that calls the upstream build system.  This must build in
   the current directory (somewhere under debian/build) and not the
   source directory.  It must enable printing of all build comamnds
   by default.

2. Define the new binary packages and their build-dependencies in
   debian/templates/control.tools-unversioned.in.  These packages
   must have "Build-Profiles: <!stage1 !pkg.linux.notools>".

3. Define build-libtraceevent and install-libtraceevent targets in 
   debian/rules.real, similarly to those for libcpupower.
   Add those to the dependencies of the build-arch-arch and
   binary-arch-arch targets, using the if_package macro to check
   whether the packages should be built.

4. Generate the debian/libtraceevent<soversion>.symbols file recording
   the shared library's exported symbols.

5. (Not sure if this is needed.)  Modify
   debian/rules.d/tools/perf/Makefile to make perf use the shared
   library.  Add libtraceevent<soversion> to the dependencies of
   linux-perf-<version> in debian/templates/control.tools-versioned.in.

Ben.

-- 
Ben Hutchings
The two most common things in the universe are hydrogen and stupidity.

[toc] | [prev] | [next] | [standalone]


#982966

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2019-11-10 22:40 +0100
Message-ID<z1369-7mu-3@gated-at.bofh.it>
In reply to#982615
On Fri, Nov 08, 2019 at 07:56:55PM +0000, Ben Hutchings wrote:
> On Mon, 2019-11-04 at 21:44 +0000, Sudip Mukherjee wrote:
> [...]
> > The code for libtracevent lives in the kernel tree at
> > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
> > And so, it will be great if kernel team will like to package and maintain it, if not, then I will
> > be happy to do it. But, if I am doing it then I will need a sponsor to upload it.
> 
> If kernel.org's kernel source repository is the canonical location for
> this code, not just a convenience copy, then the binary package should
> be built from src:linux and not a separate source package.
> 
> I think src:linux already builds the library, but only as a static
> library that's linked into perf.
> 
> I don't know exactly what changes you would need to make, but they
> should be roughly along these lines:
> 
<snip>
> 
> 4. Generate the debian/libtraceevent<soversion>.symbols file recording
>    the shared library's exported symbols.

Thanks for your reply Ben.
I will try these steps and see how it goes.

> 
> 5. (Not sure if this is needed.)  Modify
>    debian/rules.d/tools/perf/Makefile to make perf use the shared
>    library.  Add libtraceevent<soversion> to the dependencies of
>    linux-perf-<version> in debian/templates/control.tools-versioned.in.

This should not be needed as perf does not yet depend on libtraceevent.
The libtraceevent that perf is creating is only having the plugins.


--
Regards
Sudip

[toc] | [prev] | [next] | [standalone]


#982969

FromBen Hutchings <ben@decadent.org.uk>
Date2019-11-10 23:10 +0100
Message-ID<z13zb-7NP-19@gated-at.bofh.it>
In reply to#982966

[Multipart message — attachments visible in raw view] — view raw

On Sun, 2019-11-10 at 21:29 +0000, Sudip Mukherjee wrote:
> On Fri, Nov 08, 2019 at 07:56:55PM +0000, Ben Hutchings wrote:
> > On Mon, 2019-11-04 at 21:44 +0000, Sudip Mukherjee wrote:
> > [...]
> > > The code for libtracevent lives in the kernel tree at
> > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
> > > And so, it will be great if kernel team will like to package and maintain it, if not, then I will
> > > be happy to do it. But, if I am doing it then I will need a sponsor to upload it.
> > 
> > If kernel.org's kernel source repository is the canonical location for
> > this code, not just a convenience copy, then the binary package should
> > be built from src:linux and not a separate source package.
> > 
> > I think src:linux already builds the library, but only as a static
> > library that's linked into perf.
> > 
> > I don't know exactly what changes you would need to make, but they
> > should be roughly along these lines:
> > 
> <snip>
> > 4. Generate the debian/libtraceevent<soversion>.symbols file recording
> >    the shared library's exported symbols.
> 
> Thanks for your reply Ben.
> I will try these steps and see how it goes.
> 
> > 5. (Not sure if this is needed.)  Modify
> >    debian/rules.d/tools/perf/Makefile to make perf use the shared
> >    library.  Add libtraceevent<soversion> to the dependencies of
> >    linux-perf-<version> in debian/templates/control.tools-versioned.in.
> 
> This should not be needed as perf does not yet depend on libtraceevent.
> The libtraceevent that perf is creating is only having the plugins.

I'm pretty sure it does; look for "libtraceevent.a" in
<https://buildd.debian.org/status/fetch.php?pkg=linux&arch=amd64&ver=5.3.9-1&stamp=1573349194&raw=1>.

Ben.

-- 
Ben Hutchings
Humans are not rational beings; they are rationalising beings.

[toc] | [prev] | [next] | [standalone]


#983106

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2019-11-11 22:40 +0100
Message-ID<z1pzH-5hU-9@gated-at.bofh.it>
In reply to#982969
Hi Ben,

On Sun, Nov 10, 2019 at 10:01 PM Ben Hutchings <ben@decadent.org.uk> wrote:
>
> On Sun, 2019-11-10 at 21:29 +0000, Sudip Mukherjee wrote:
> > On Fri, Nov 08, 2019 at 07:56:55PM +0000, Ben Hutchings wrote:
> > > On Mon, 2019-11-04 at 21:44 +0000, Sudip Mukherjee wrote:
> > > [...]
> > > > The code for libtracevent lives in the kernel tree at
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
> > > > And so, it will be great if kernel team will like to package and maintain it, if not, then I will
> > > > be happy to do it. But, if I am doing it then I will need a sponsor to upload it.
> > >
> > > If kernel.org's kernel source repository is the canonical location for
> > > this code, not just a convenience copy, then the binary package should
> > > be built from src:linux and not a separate source package.
> > >
> > > I think src:linux already builds the library, but only as a static
> > > library that's linked into perf.
> > >
> > > I don't know exactly what changes you would need to make, but they
> > > should be roughly along these lines:
> > >
> > <snip>
> > > 4. Generate the debian/libtraceevent<soversion>.symbols file recording
> > >    the shared library's exported symbols.
> >
> > Thanks for your reply Ben.
> > I will try these steps and see how it goes.
> >
> > > 5. (Not sure if this is needed.)  Modify
> > >    debian/rules.d/tools/perf/Makefile to make perf use the shared
> > >    library.  Add libtraceevent<soversion> to the dependencies of
> > >    linux-perf-<version> in debian/templates/control.tools-versioned.in.
> >
> > This should not be needed as perf does not yet depend on libtraceevent.
> > The libtraceevent that perf is creating is only having the plugins.
>
> I'm pretty sure it does; look for "libtraceevent.a" in
> <https://buildd.debian.org/status/fetch.php?pkg=linux&arch=amd64&ver=5.3.9-1&stamp=1573349194&raw=1>.

iiuc, perf used tools/lib/traceevent to generate "libtraceevent.a"
which is a static library and perf is building against that. It is
also using the plugins generated by traceevent. But it is not using
"libtraceevent.so" which is generated. So, as a result all the
traceevent code is statically linked in perf when it builds.
If I see the installation folder of perf I am only seeing
"lib64/traceevent/plugins" and I am not seeing the dynamic library
created by traceevent.
Moreover if I do "ldd perf" it is not showing that it is linked to
libtraceevent.so. But, in anycase, I will need to modify the rules as
the plugins will be installed by traceevent which will be used by
perf.
I hope I was able to explain properly. But, let me make the changes
and test first and then I can show you what I did.
Thanks for your help.


-- 
Regards
Sudip

[toc] | [prev] | [next] | [standalone]


#983134

FromBen Hutchings <ben@decadent.org.uk>
Date2019-11-12 03:50 +0100
Message-ID<z1upH-8iV-3@gated-at.bofh.it>
In reply to#983106

[Multipart message — attachments visible in raw view] — view raw

On Mon, 2019-11-11 at 21:37 +0000, Sudip Mukherjee wrote:
> Hi Ben,
> 
> On Sun, Nov 10, 2019 at 10:01 PM Ben Hutchings <ben@decadent.org.uk> wrote:
> > On Sun, 2019-11-10 at 21:29 +0000, Sudip Mukherjee wrote:
> > > On Fri, Nov 08, 2019 at 07:56:55PM +0000, Ben Hutchings wrote:
> > > > On Mon, 2019-11-04 at 21:44 +0000, Sudip Mukherjee wrote:
> > > > [...]
> > > > > The code for libtracevent lives in the kernel tree at
> > > > > git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git in tools/lib/traceevent folder.
> > > > > And so, it will be great if kernel team will like to package and maintain it, if not, then I will
> > > > > be happy to do it. But, if I am doing it then I will need a sponsor to upload it.
> > > > 
> > > > If kernel.org's kernel source repository is the canonical location for
> > > > this code, not just a convenience copy, then the binary package should
> > > > be built from src:linux and not a separate source package.
> > > > 
> > > > I think src:linux already builds the library, but only as a static
> > > > library that's linked into perf.
> > > > 
> > > > I don't know exactly what changes you would need to make, but they
> > > > should be roughly along these lines:
> > > > 
> > > <snip>
> > > > 4. Generate the debian/libtraceevent<soversion>.symbols file recording
> > > >    the shared library's exported symbols.
> > > 
> > > Thanks for your reply Ben.
> > > I will try these steps and see how it goes.
> > > 
> > > > 5. (Not sure if this is needed.)  Modify
> > > >    debian/rules.d/tools/perf/Makefile to make perf use the shared
> > > >    library.  Add libtraceevent<soversion> to the dependencies of
> > > >    linux-perf-<version> in debian/templates/control.tools-versioned.in.
> > > 
> > > This should not be needed as perf does not yet depend on libtraceevent.
> > > The libtraceevent that perf is creating is only having the plugins.
> > 
> > I'm pretty sure it does; look for "libtraceevent.a" in
> > <https://buildd.debian.org/status/fetch.php?pkg=linux&arch=amd64&ver=5.3.9-1&stamp=1573349194&raw=1>;.
> 
> iiuc, perf used tools/lib/traceevent to generate "libtraceevent.a"
> which is a static library and perf is building against that. It is
> also using the plugins generated by traceevent. But it is not using
> "libtraceevent.so" which is generated.
[...]

Yes, exactly.  And it is usual practice in Debian to link with shared
libraries where possible.  (I thought that was actually in policy, but
it doesn't seem to be.)

Ben.

-- 
Ben Hutchings
I'm not a reverse psychological virus.
Please don't copy me into your signature.


[toc] | [prev] | [next] | [standalone]


#983398

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2019-11-15 12:50 +0100
Message-ID<z2IgV-4tK-3@gated-at.bofh.it>
In reply to#983134
iiuc, Debian kernel can only have patches accepted upstream. And, so
this is now blocked on:
https://patchwork.kernel.org/patch/11243801/
https://patchwork.kernel.org/patch/11246125/
https://patchwork.kernel.org/patch/11246127/

I will wait till they are accepted and appears on linux-next.

--
Regards
Sudip

[toc] | [prev] | [next] | [standalone]


#986485

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2019-12-08 01:30 +0100
Message-ID<zaSCt-1PD-5@gated-at.bofh.it>
In reply to#983398
On Fri, Nov 15, 2019 at 11:44:03AM +0000, Sudip Mukherjee wrote:
> iiuc, Debian kernel can only have patches accepted upstream. And, so
> this is now blocked on:
> https://patchwork.kernel.org/patch/11243801/
> https://patchwork.kernel.org/patch/11246125/
> https://patchwork.kernel.org/patch/11246127/
> 
> I will wait till they are accepted and appears on linux-next.

wip merge request has been opened in salsa at:
https://salsa.debian.org/kernel-team/linux/merge_requests/192

Another patch had to be sent upstream, and once I get the Ack for that
the wip: can be removed from the merge request.

@Ben: if you get some time can you please have an initial look at this.

--
Regards
Sudip

[toc] | [prev] | [next] | [standalone]


#988466

FromSudip Mukherjee <sudipm.mukherjee@gmail.com>
Date2019-12-25 13:10 +0100
Message-ID<zhdEd-56Y-1@gated-at.bofh.it>
In reply to#986485
just fyi.

Merge request has been opened in salsa -
https://salsa.debian.org/kernel-team/linux/merge_requests/192 and is
waiting for the review from kernel-team.

--
Regards
Sudip

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.bugs.dist


csiph-web