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

2019-12-25 Thread Sudip Mukherjee
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



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

2019-12-07 Thread Sudip Mukherjee
On Fri, Nov 15, 2019 at 11:44:03AM +, 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



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

2019-11-15 Thread Sudip Mukherjee
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



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

2019-11-11 Thread Ben Hutchings
On Mon, 2019-11-11 at 21:37 +, Sudip Mukherjee wrote:
> Hi Ben,
> 
> On Sun, Nov 10, 2019 at 10:01 PM Ben Hutchings  wrote:
> > On Sun, 2019-11-10 at 21:29 +, Sudip Mukherjee wrote:
> > > On Fri, Nov 08, 2019 at 07:56:55PM +, Ben Hutchings wrote:
> > > > On Mon, 2019-11-04 at 21:44 +, 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:
> > > > 
> > > 
> > > > 4. Generate the debian/libtraceevent.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 to the dependencies of
> > > >linux-perf- 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
> > ;.
> 
> 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.




signature.asc
Description: This is a digitally signed message part


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

2019-11-11 Thread Sudip Mukherjee
Hi Ben,

On Sun, Nov 10, 2019 at 10:01 PM Ben Hutchings  wrote:
>
> On Sun, 2019-11-10 at 21:29 +, Sudip Mukherjee wrote:
> > On Fri, Nov 08, 2019 at 07:56:55PM +, Ben Hutchings wrote:
> > > On Mon, 2019-11-04 at 21:44 +, 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:
> > >
> > 
> > > 4. Generate the debian/libtraceevent.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 to the dependencies of
> > >linux-perf- 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
> .

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



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

2019-11-10 Thread Ben Hutchings
On Sun, 2019-11-10 at 21:29 +, Sudip Mukherjee wrote:
> On Fri, Nov 08, 2019 at 07:56:55PM +, Ben Hutchings wrote:
> > On Mon, 2019-11-04 at 21:44 +, 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:
> > 
> 
> > 4. Generate the debian/libtraceevent.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 to the dependencies of
> >linux-perf- 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
.

Ben.

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



signature.asc
Description: This is a digitally signed message part


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

2019-11-10 Thread Sudip Mukherjee


On Fri, Nov 08, 2019 at 07:56:55PM +, Ben Hutchings wrote:
> On Mon, 2019-11-04 at 21:44 +, 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:
> 

> 
> 4. Generate the debian/libtraceevent.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 to the dependencies of
>linux-perf- 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



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

2019-11-08 Thread Ben Hutchings
On Mon, 2019-11-04 at 21:44 +, 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: ".

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.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 to the dependencies of
   linux-perf- in debian/templates/control.tools-versioned.in.

Ben.

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



signature.asc
Description: This is a digitally signed message part


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

2019-11-04 Thread Sudip Mukherjee
Package: wnpp
Severity: wishlist
Owner: Sudip Mukherjee 
X-Debbugs-Cc: debian-de...@lists.debian.org, debian-ker...@lists.debian.org

* Package name: libtraceevent
  Version : 1.1.0
  Upstream Author : Steven Rostedt (VMware) 
* 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