Skip to contentSkip to conversation

lttng-2.0 fixes

PATCH In review [email protected] 4 participants 10 messages Oct 12, 2012 – Oct 16, 2012

lore
Share & tools
lore
#0 lore raw

cover lttng-2.0 fixes

From: Tom Zanussi <[email protected]>

The current packagegroup-core-tools-profile pulls in 'legacy' lttng packages, which are useless with the linux-yocto kernels since those don't include lttng support.

lttng-2.0 does seem to work, if the patch for lttng-modules that I just sent to oe-core is applied as well (lttng-modules: update SRCREV and remove is_compat_task).

I've only done minimal testing using qemux86, but even so it should at least be better than the curent situation.

Sending this patch to poky instead of oe-core since it could be that legacy lttng is what's being used by most people, but it clearly doesn't work for yocto.

The following changes since commit 0260bb5c6978839c068007fcff2f704937805faf:

gitignore: Fix for poky repository (2012-10-11 13:52:14 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib.git tzanussi/lttng-fixes.0
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/lttng-fixes.0

Tom Zanussi (2):
lttng-modules: update SRCREV and remove is_compat_task patch packagegroup-core-tools-profile: replace 'legacy' lttng with lttng

    2.0
 .../packagegroup-core-tools-profile.bb             |  9 ++---
 ...ls-protect-is_compat_task-from-redefiniti.patch | 41 ----------------------
 .../lttng-2.0/lttng-modules_2.0.5.bb               |  9 +++--
 3 files changed, 9 insertions(+), 50 deletions(-)
 delete mode 100644 meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch
Signature · 1 line
1.7.11.4
#1 lore raw

PATCH 1/1 packagegroup-core-tools-profile: replace 'legacy' lttng with lttng 2.0

From: Tom Zanussi <[email protected]>

packagegroup-core-tools-profile currently pulls in the 'legacy' lttng packages, which are useless without legacy lttng support in the kernel.

This makes packagegroup-core-tools-profile pull in the lttng 2.0 packages instead, which don't need any kernel modifications to work.

---
 .../packagegroups/packagegroup-core-tools-profile.bb             | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +5 -4
index 1035036..bf6e16e 100644
@@ -5,7 +5,7 @@
 SUMMARY = "Profiling tools"
 LICENSE = "MIT"
 
-PR = "r1"
+PR = "r2"
 
 inherit packagegroup
 
@@ -29,8 +29,9 @@ PROFILETOOLS = "\
     oprofileui-server \
     powertop \
     latencytop \
-    lttng-control \
-    lttng-viewer"
+    lttng-tools \
+    lttng-modules \
+    babeltrace"
 
 # systemtap needs elfutils which is not fully buildable on uclibc
 # hence we exclude it from uclibc based builds
@@ -44,7 +45,7 @@ SYSTEMTAP_mips = ""
 # which means we can not use syscall() to call it. So we ignore
 # it for x86_64/uclibc
 
-LTTNGUST = "lttng-ust"
+LTTNGUST = "lttng2-ust"
 LTTNGUST_libc-uclibc = ""
 LTTNGUST_mips = ""
 
Signature · 1 line
1.7.11.4
Acked-by on v1 1/1
#2 lore raw

Re: [PATCH 1/1] packagegroup-core-tools-profile: replace 'legacy' lttng with lttng 2.0

Quoted 7 lines · On 12-10-12 03:53 PM, [email protected] wrote:

From: Tom Zanussi<[email protected]>

packagegroup-core-tools-profile currently pulls in the 'legacy' lttng packages, which are useless without legacy lttng support in the kernel.

This makes packagegroup-core-tools-profile pull in the lttng 2.0 packages instead, which don't need any kernel modifications to work.

Definitely the right thing to do, oe-core needs the email too though!

Quoted 40 lines
---
  .../packagegroups/packagegroup-core-tools-profile.bb             | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +5 -4
index 1035036..bf6e16e 100644
@@ -5,7 +5,7 @@
  SUMMARY = "Profiling tools"
  LICENSE = "MIT"
 
-PR = "r1"
+PR = "r2"
 
  inherit packagegroup
 
@@ -29,8 +29,9 @@ PROFILETOOLS = "\
      oprofileui-server \
      powertop \
      latencytop \
-    lttng-control \
-    lttng-viewer"
+    lttng-tools \
+    lttng-modules \
+    babeltrace"
 
  # systemtap needs elfutils which is not fully buildable on uclibc
  # hence we exclude it from uclibc based builds
@@ -44,7 +45,7 @@ SYSTEMTAP_mips = ""
  # which means we can not use syscall() to call it. So we ignore
  # it for x86_64/uclibc
 
-LTTNGUST = "lttng-ust"
+LTTNGUST = "lttng2-ust"
  LTTNGUST_libc-uclibc = ""
  LTTNGUST_mips = ""
 
#3 lore raw

Re: [PATCH 1/1] packagegroup-core-tools-profile: replace 'legacy' lttng with lttng 2.0

Quoted 10 lines · Bruce Ashfield
Quoted 7 lines · On 12-10-12 03:53 PM, [email protected] wrote:

From: Tom Zanussi<[email protected]>

packagegroup-core-tools-profile currently pulls in the 'legacy' lttng packages, which are useless without legacy lttng support in the kernel.

This makes packagegroup-core-tools-profile pull in the lttng 2.0 packages instead, which don't need any kernel modifications to work.

Definitely the right thing to do, oe-core needs the email too though!

oops. Not for this profile.

Bruce

Quoted 50 lines
Quoted 39 lines

---
.../packagegroups/packagegroup-core-tools-profile.bb | 9 +++++----

1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb b/meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb index 1035036..bf6e16e 100644

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +0 -0
@@ -5,7 +5,7 @@

SUMMARY = "Profiling tools"
LICENSE = "MIT"

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
-PR = "r1"
+PR = "r2"

inherit packagegroup

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +4 -3
@@ -29,8 +29,9 @@ PROFILETOOLS = "\
 oprofileui-server \
 powertop \
 latencytop \
- lttng-control \
- lttng-viewer"
+ lttng-tools \
+ lttng-modules \
+ babeltrace"
 
 # systemtap needs elfutils which is not fully buildable on uclibc
 # hence we exclude it from uclibc based builds
@@ -44,7 +45,7 @@ SYSTEMTAP_mips = ""
 # which means we can not use syscall() to call it. So we ignore
 # it for x86_64/uclibc
 
-LTTNGUST = "lttng-ust"
+LTTNGUST = "lttng2-ust"
Quoted 3 lines

LTTNGUST_libc-uclibc = ""
LTTNGUST_mips = ""

_______________________________________________
poky mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/poky

#4 lore raw

Re: [PATCH 1/1] packagegroup-core-tools-profile: replace 'legacy' lttng with lttng 2.0

In reply to [email protected]
Quoted 27 lines · On 10/12/2012 12:53 PM, [email protected] wrote:

From: Tom Zanussi <[email protected]>

packagegroup-core-tools-profile currently pulls in the 'legacy' lttng packages, which are useless without legacy lttng support in the kernel.

This makes packagegroup-core-tools-profile pull in the lttng 2.0 packages instead, which don't need any kernel modifications to work.

---
  .../packagegroups/packagegroup-core-tools-profile.bb             | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
index 1035036..bf6e16e 100644
@@ -5,7 +5,7 @@
  SUMMARY = "Profiling tools"
  LICENSE = "MIT"
 
-PR = "r1"
+PR = "r2"
 
  inherit packagegroup
 

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb PROFILETOOLS = "\ · line 35

Quoted 9 lines
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +3 -2
@@ -29,8 +29,9 @@ PROFILETOOLS = "\
      oprofileui-server \
      powertop \
      latencytop \
-    lttng-control \
-    lttng-viewer"
+    lttng-tools \
+    lttng-modules \
+    babeltrace"
 

Not sure this will work since babeltrace is not buildable for mips machines.

Sau!

Quoted 12 lines
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
  # systemtap needs elfutils which is not fully buildable on uclibc
  # hence we exclude it from uclibc based builds
@@ -44,7 +45,7 @@ SYSTEMTAP_mips = ""
  # which means we can not use syscall() to call it. So we ignore
  # it for x86_64/uclibc
 
-LTTNGUST = "lttng-ust"
+LTTNGUST = "lttng2-ust"
  LTTNGUST_libc-uclibc = ""
  LTTNGUST_mips = ""
 
#5 lore raw

Re: [PATCH 1/1] packagegroup-core-tools-profile: replace 'legacy' lttng with lttng 2.0

Quoted 27 lines · Saul Wold
Quoted 26 lines · On 10/12/2012 12:53 PM, [email protected] wrote:

From: Tom Zanussi <[email protected]>

packagegroup-core-tools-profile currently pulls in the 'legacy' lttng packages, which are useless without legacy lttng support in the kernel.

This makes packagegroup-core-tools-profile pull in the lttng 2.0 packages instead, which don't need any kernel modifications to work.

---
  .../packagegroups/packagegroup-core-tools-profile.bb             | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
index 1035036..bf6e16e 100644
@@ -5,7 +5,7 @@
  SUMMARY = "Profiling tools"
  LICENSE = "MIT"
 
-PR = "r1"
+PR = "r2"
 
  inherit packagegroup
 
Quoted 11 lines

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb PROFILETOOLS = "\ · line 35

Quoted 10 lines
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +3 -2
@@ -29,8 +29,9 @@ PROFILETOOLS = "\
      oprofileui-server \
      powertop \
      latencytop \
-    lttng-control \
-    lttng-viewer"
+    lttng-tools \
+    lttng-modules \
+    babeltrace"
 

Not sure this will work since babeltrace is not buildable for mips machines.

I guess that means we just need a BABELTRACE and BABELTRACE_mips definition? Or perhaps a set for LTTNG similar to those below for LTTNGUST ?

--
Darren

Quoted 15 lines

Sau!

Quoted 12 lines
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
  # systemtap needs elfutils which is not fully buildable on uclibc
  # hence we exclude it from uclibc based builds
@@ -44,7 +45,7 @@ SYSTEMTAP_mips = ""
  # which means we can not use syscall() to call it. So we ignore
  # it for x86_64/uclibc
 
-LTTNGUST = "lttng-ust"
+LTTNGUST = "lttng2-ust"
  LTTNGUST_libc-uclibc = ""
  LTTNGUST_mips = ""
 
Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Technical Lead - Linux Kernel
#6 lore raw

Re: [PATCH 1/1] packagegroup-core-tools-profile: replace 'legacy' lttng with lttng 2.0

In reply to Saul Wold
Quoted 27 lines · Saul Wold
Quoted 26 lines · On 10/12/2012 12:53 PM, [email protected] wrote:

From: Tom Zanussi <[email protected]>

packagegroup-core-tools-profile currently pulls in the 'legacy' lttng packages, which are useless without legacy lttng support in the kernel.

This makes packagegroup-core-tools-profile pull in the lttng 2.0 packages instead, which don't need any kernel modifications to work.

---
  .../packagegroups/packagegroup-core-tools-profile.bb             | 9 +++++----
  1 file changed, 5 insertions(+), 4 deletions(-)
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
index 1035036..bf6e16e 100644
@@ -5,7 +5,7 @@
  SUMMARY = "Profiling tools"
  LICENSE = "MIT"
 
-PR = "r1"
+PR = "r2"
 
  inherit packagegroup
 
Quoted 12 lines

meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb PROFILETOOLS = "\ · line 35

Quoted 10 lines
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +3 -2
@@ -29,8 +29,9 @@ PROFILETOOLS = "\
      oprofileui-server \
      powertop \
      latencytop \
-    lttng-control \
-    lttng-viewer"
+    lttng-tools \
+    lttng-modules \
+    babeltrace"
 

Not sure this will work since babeltrace is not buildable for mips machines.

Yeah, I guess things like this are another reason it hasn't been switched over (though I wouldn't have expected a userspace translation tool to be the thing that choked on mips).

So might as well hold off on this until I can test lttng on all the arches.

Tom

Quoted 14 lines

Sau!

Quoted 12 lines
meta/recipes-core/packagegroups/packagegroup-core-tools-profile.bb +1 -1
  # systemtap needs elfutils which is not fully buildable on uclibc
  # hence we exclude it from uclibc based builds
@@ -44,7 +45,7 @@ SYSTEMTAP_mips = ""
  # which means we can not use syscall() to call it. So we ignore
  # it for x86_64/uclibc
 
-LTTNGUST = "lttng-ust"
+LTTNGUST = "lttng2-ust"
  LTTNGUST_libc-uclibc = ""
  LTTNGUST_mips = ""
 
#7 lore raw

PATCH 1/1 lttng-modules: update SRCREV and remove is_compat_task patch

In reply to [email protected]

From: Tom Zanussi <[email protected]>

The existing SRCREV doesn't point to v2.0.5 as the recipe version suggests, and is actually building modules that won't work with the lttng-tools it's supposed to be matching.

Also, remove the is_compat_task patch for lttng-syscalls.c to avoid do_patch errors, as recent versions of lttng-modules have added this check.

---
 ...ls-protect-is_compat_task-from-redefiniti.patch | 41 ----------------------
 .../lttng-2.0/lttng-modules_2.0.5.bb               |  9 +++--
 2 files changed, 4 insertions(+), 46 deletions(-)
 delete mode 100644 meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch
meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch deleted +0 -41
deleted file mode 100644
index 0056633..0000000
@@ -1,41 +0,0 @@
-From 415a1a678cb2fcf603f9777f2c7b71c1e38f8101 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield <[email protected]>
-Date: Mon, 19 Mar 2012 13:30:31 -0400
-Subject: [PATCH] lttng-sycalls: protect is_compat_task from redefinition
-
-recent -stable kernels have their own fallback definition of is_compat_task
-
-   #define is_compat_task() (0)
-
-To protect against this double definition of is_compat_task we can check
-to see if it is already defined, and skip the lttng variant.
-
-Signed-off-by: Bruce Ashfield <[email protected]>
----
- lttng-syscalls.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/lttng-syscalls.c b/lttng-syscalls.c
-index 9de3c07..80d0f05 100644
---- a/lttng-syscalls.c
-+++ b/lttng-syscalls.c
-@@ -17,12 +17,16 @@
- #include "ltt-events.h"
- 
- #ifndef CONFIG_COMPAT
-+
-+#ifndef is_compat_task
- static inline int is_compat_task(void)
- {
- 	return 0;
- }
- #endif
- 
-+#endif
-+
- static
- void syscall_entry_probe(void *__data, struct pt_regs *regs, long id);
- 
--- 
-1.7.5.4
-
meta/recipes-kernel/lttng-2.0/lttng-modules_2.0.5.bb +4 -5
index 4c78f36..96ab85f 100644
@@ -10,13 +10,12 @@ DEPENDS = "virtual/kernel"
 
 inherit module
 
-SRCREV = "4d3e89e379fc66480d729abe8daa5c86eb585400"
-PV = "2.0.pre11+git${SRCREV}"
-PR = "r0"
+SRCREV = "cbb0f0f5203e9901084f38792e484f6fa988e10a"
+PV = "2.0.5+git${SRCREV}"
+PR = "r1"
 
 SRC_URI = "git://git.lttng.org/lttng-modules.git;protocol=git \
-           file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
-           file://lttng-sycalls-protect-is_compat_task-from-redefiniti.patch"
+           file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch"
 
 export INSTALL_MOD_DIR="kernel/lttng-modules"
 export KERNEL_SRC="${STAGING_KERNEL_DIR}"
Signature · 1 line
1.7.11.4
Acked-by on v1 1/1
#8 lore raw

Re: [PATCH 1/1] lttng-modules: update SRCREV and remove is_compat_task patch

Quoted 9 lines · On 12-10-12 03:52 PM, [email protected] wrote:

From: Tom Zanussi<[email protected]>

The existing SRCREV doesn't point to v2.0.5 as the recipe version suggests, and is actually building modules that won't work with the lttng-tools it's supposed to be matching.

Also, remove the is_compat_task patch for lttng-syscalls.c to avoid do_patch errors, as recent versions of lttng-modules have added this check.

Quoted 77 lines
---
  ...ls-protect-is_compat_task-from-redefiniti.patch | 41 ----------------------
  .../lttng-2.0/lttng-modules_2.0.5.bb               |  9 +++--
  2 files changed, 4 insertions(+), 46 deletions(-)

delete mode 100644 meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch

meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch deleted +0 -41
deleted file mode 100644
index 0056633..0000000
@@ -1,41 +0,0 @@
-From 415a1a678cb2fcf603f9777f2c7b71c1e38f8101 Mon Sep 17 00:00:00 2001
-From: Bruce Ashfield<[email protected]>
-Date: Mon, 19 Mar 2012 13:30:31 -0400
-Subject: [PATCH] lttng-sycalls: protect is_compat_task from redefinition
-
-recent -stable kernels have their own fallback definition of is_compat_task
-
-   #define is_compat_task() (0)
-
-To protect against this double definition of is_compat_task we can check
-to see if it is already defined, and skip the lttng variant.
-
-Signed-off-by: Bruce Ashfield<[email protected]>
----
- lttng-syscalls.c |    4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/lttng-syscalls.c b/lttng-syscalls.c
-index 9de3c07..80d0f05 100644
---- a/lttng-syscalls.c
-+++ b/lttng-syscalls.c
-@@ -17,12 +17,16 @@
- #include "ltt-events.h"
-
- #ifndef CONFIG_COMPAT
-+
-+#ifndef is_compat_task
- static inline int is_compat_task(void)
- {
- 	return 0;
- }
- #endif
-
-+#endif
-+
- static
- void syscall_entry_probe(void *__data, struct pt_regs *regs, long id);
-
---
-1.7.5.4
-
meta/recipes-kernel/lttng-2.0/lttng-modules_2.0.5.bb +4 -5
index 4c78f36..96ab85f 100644
@@ -10,13 +10,12 @@ DEPENDS = "virtual/kernel"
 
  inherit module
 
-SRCREV = "4d3e89e379fc66480d729abe8daa5c86eb585400"
-PV = "2.0.pre11+git${SRCREV}"
-PR = "r0"
+SRCREV = "cbb0f0f5203e9901084f38792e484f6fa988e10a"
+PV = "2.0.5+git${SRCREV}"
+PR = "r1"
 
  SRC_URI = "git://git.lttng.org/lttng-modules.git;protocol=git \
-           file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch \
-           file://lttng-sycalls-protect-is_compat_task-from-redefiniti.patch"
+           file://lttng-modules-replace-KERNELDIR-with-KERNEL_SRC.patch"
 
  export INSTALL_MOD_DIR="kernel/lttng-modules"
  export KERNEL_SRC="${STAGING_KERNEL_DIR}"
#9 lore raw
In reply to [email protected]
Quoted 28 lines · On 12-10-12 03:52 PM, [email protected] wrote:

From: Tom Zanussi<[email protected]>

When trying out the current lttng-2.0, I found that it didn't work in its current state. This patch makes it work again, or at least a a quick test on qemux86 works:

Before:

root@qemux86:~# lttng create
Spawning a session daemon
FATAL: Module lttng-tracer not found.
Error: Unable to load module lttng-tracer
Error: Unable to remove module lttng-tracer
Warning: No kernel tracer available
Session auto-20121012-190712 created.
Traces will be written in /home/root/lttng-traces/auto-20121012-190712

After:

root@qemux86:~# lttng create
Spawning a session daemon
Session auto-20121012-192342 created.
Traces will be written in /home/root/lttng-traces/auto-20121012-192342
root@qemux86:~# lttng enable-event --kernel --all
All kernel events are enabled in channel channel0
root@qemux86:~# lttng start
Tracing started for session auto-20121012-192342
root@qemux86:~# lttng stop
Quoted 10 lines
Tracing stopped for session auto-20121012-192342
root@qemux86:~# lttng view
[19:27:01.661844467] (+?.?????????) hrtimer_cancel: { 0 }, { hrtimer = 3354328992 }
[19:27:01.661854316] (+0.000009849) hrtimer_expire_entry: { 0 }, { hrtimer = 3354328992, now = \
318684045266, function = 3238494992 }
[19:27:01.661870669] (+0.000016353) softirq_raise: { 0 }, { vec = 1 }
[19:27:01.661876340] (+0.000005671) softirq_raise: { 0 }, { vec = 9 }
[19:27:01.661887892] (+0.000011552) sched_stat_runtime: { 0 }, { comm = "lttng-sessiond", tid =

That's what I'd expect.

Looks good from here.

Bruce

Quoted 17 lines

The following changes since commit 0260bb5c6978839c068007fcff2f704937805faf:

gitignore: Fix for poky repository (2012-10-11 13:52:14 +0100)

are available in the git repository at:

git://git.yoctoproject.org/poky-contrib.git tzanussi/lttng-fixes.0
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=tzanussi/lttng-fixes.0

Tom Zanussi (2):
lttng-modules: update SRCREV and remove is_compat_task patch

  ...ls-protect-is_compat_task-from-redefiniti.patch | 41 ----------------------
  .../lttng-2.0/lttng-modules_2.0.5.bb               |  9 +++--
  2 files changed, 9 insertions(+), 50 deletions(-)

delete mode 100644 meta/recipes-kernel/lttng-2.0/lttng-modules/lttng-sycalls-protect-is_compat_task-from-redefiniti.patch