Re: [lttng-dev] lost trace events

2018-11-08 Thread Jonathan Rajotte-Julien
> A custom trace event class emits "begin" and "end" events in its
> constructor and destructor respectively. So I do not think this is due to
> conditional path.

If you can guarantee that the destructor is called, seems good to me.

Do you see scenario where the "begin" event is missing ?

> 
> Sequence of commands to capture a snapshot are:
> lttng create --snapshot
> lttng enable-event --userspace --all
> lttng add-context --userspace -t vpid -t vtid
> lttng start
> lttng stop
> lttng snapshot record

Nothing out of the ordinary here.

> 
> We create a new session for each snapshot to make sure that the buffer does
> not have any left-over events from the previous session. But I am curious
> if lttng shares buffers between sessions or re-uses buffers from an old
> session without flushing?

No sharing is done between sessions AFAIK.

> 
> Note that I am using the default LTTNG_BUFFER_PER_UID mode. All processes
> for our application run under one UID, and only one tracing session is
> active at a time.

Again, nothing out of the ordinary.

Next step would be a small reproducer.

Is the system under load?
Is there any cpu affinity set?
What kind of system are we talking about (x86_64? arm? 24+ cores? etc.)

Cheers

-- 
Jonathan Rajotte-Julien
EfficiOS
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] lost trace events

2018-11-08 Thread Mathieu Desnoyers
Hi Alok, 

With a snapshot trace, you can end up with some per-cpu buffers that contain 
information 
going further back in time compared to other per-cpu buffers. This depends on 
the level of 
system activity and tracing throughput for each CPU. 

The situation you experience can very well be triggered by having the begin 
event on one CPU, 
being migrated to another CPU, and having the end event on another CPU. If 
either the 
source or destination CPU has been more active than the other, you may find 
that you 
have only the begin or the end event in your trace. 

This is why we implemented the "stream intersection" mode in babeltrace. It 
ensures that 
babeltrace cuts away trace data belonging to time spans that only appear in 
some of 
the streams. It is not however activated by default. 

To try it out, you can do this: 

babeltrace --stream-intersection path/to/trace 

Does it help ? 

Thanks, 

Mathieu 

- On Nov 7, 2018, at 7:12 PM, Alok Priyadarshi  wrote: 

> A custom trace event class emits "begin" and "end" events in its constructor 
> and
> destructor respectively. So I do not think this is due to conditional path.

> Sequence of commands to capture a snapshot are:
> lttng create --snapshot
> lttng enable-event --userspace --all
> lttng add-context --userspace -t vpid -t vtid
> lttng start
> lttng stop
> lttng snapshot record

> We create a new session for each snapshot to make sure that the buffer does 
> not
> have any left-over events from the previous session. But I am curious if lttng
> shares buffers between sessions or re-uses buffers from an old session without
> flushing?

> Note that I am using the default LTTNG_BUFFER_PER_UID mode. All processes for
> our application run under one UID, and only one tracing session is active at a
> time.

> On Wed, Nov 7, 2018 at 12:09 PM Jonathan Rajotte-Julien < [
> mailto:jonathan.rajotte-jul...@efficios.com |
> jonathan.rajotte-jul...@efficios.com ] > wrote:

>> Hi Alok,

>> On Wed, Nov 07, 2018 at 11:53:25AM -0800, Alok Priyadarshi wrote:
>> > Hi Jonathan,

>> > Thanks for your response.

>> > We are tracing function scopes. Each scope emits two events - begin and
>> > end. We noticed that some begin events did not have corresponding end
>> > events in the trace.

>> Seems like a solid ground as long as the corresponding ending event is not
>> inside any conditional paths. I'm sure you already validated that but we 
>> never
>> know.


>> > I have the trace with this problem available. Would that provide any clue?

>> It could help but I presume it might contains confidential or sensible
>> information. Let's define the scenario first and we will go back to actual
>> trace data if needed.

>> > If not, I will try to extract a small reproducer.

>> That would be best. In the meantime, could you provide the exact lttng 
>> commands
>> used to setup everything and describe subsequent lttng commands used for
>> snapshot etc.

>> You can omit event name or replace them with dummy name if necessary.

>> Cheers

>> --
>> Jonathan Rajotte-Julien
>> EfficiOS

> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers 
EfficiOS Inc. 
http://www.efficios.com 
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [PATCH lttng-modules] RFC: Drop support for kernels < 3.0

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 README.md |   2 +-
 instrumentation/events/lttng-module/block.h   |  89 +--
 instrumentation/events/lttng-module/ext4.h| 179 +-
 instrumentation/events/lttng-module/irq.h |  64 --
 instrumentation/events/lttng-module/jbd2.h|   6 -
 instrumentation/events/lttng-module/kmem.h|   7 -
 instrumentation/events/lttng-module/kvm.h |  10 -
 instrumentation/events/lttng-module/lock.h|  71 +--
 .../events/lttng-module/mm_vmscan.h   |   2 +-
 instrumentation/events/lttng-module/module.h  |  22 +-
 instrumentation/events/lttng-module/net.h |  12 -
 instrumentation/events/lttng-module/power.h   |  40 --
 instrumentation/events/lttng-module/sched.h   |  68 +--
 instrumentation/events/lttng-module/scsi.h|   8 -
 instrumentation/events/lttng-module/skb.h |   4 -
 .../events/lttng-module/workqueue.h   |  61 --
 .../events/lttng-module/writeback.h   |   4 -
 lib/bug.h |  10 +-
 lib/ringbuffer/frontend_types.h   |   1 -
 .../backport-kallsym-sym-2.6.32.patch |  37 --
 .../backport-splice-sym-2.6.32-34.patch   |  71 ---
 .../backport-tp-2.6.34-tracepoint-data.patch  | 559 --
 .../backport-tracepoint-data-2.6.32-33.patch  | 555 -
 lttng-events.c|   7 +-
 lttng-events.h|   6 +-
 lttng-kernel-version.h|   5 -
 lttng-statedump-impl.c|   9 +-
 probes/lttng-probe-lock.c |   5 -
 tests/probes/lttng-test.c |   3 +-
 wrapper/atomic.h  |   4 -
 wrapper/kstrtox.h |  47 --
 wrapper/perf.h|  25 -
 wrapper/spinlock.h|  34 --
 wrapper/tracepoint.h  |   6 -
 wrapper/uuid.h|  30 -
 wrapper/vzalloc.h |  34 --
 36 files changed, 37 insertions(+), 2060 deletions(-)
 delete mode 100644 linux-patches/backport-kallsym-sym-2.6.32.patch
 delete mode 100644 linux-patches/backport-splice-sym-2.6.32-34.patch
 delete mode 100644 linux-patches/backport-tp-2.6.34-tracepoint-data.patch
 delete mode 100644 linux-patches/backport-tracepoint-data-2.6.32-33.patch
 delete mode 100644 wrapper/kstrtox.h
 delete mode 100644 wrapper/spinlock.h
 delete mode 100644 wrapper/uuid.h
 delete mode 100644 wrapper/vzalloc.h

diff --git a/README.md b/README.md
index 201a579..66bf925 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,7 @@ to print traces as a human-readable text log.
 Support
 ---
 
-Linux kernels >= 2.6.36 are supported.
+Linux kernels >= 3.0 are supported.
 
 
 Notes
diff --git a/instrumentation/events/lttng-module/block.h 
b/instrumentation/events/lttng-module/block.h
index e7e9449..9f77526 100644
--- a/instrumentation/events/lttng-module/block.h
+++ b/instrumentation/events/lttng-module/block.h
@@ -81,24 +81,7 @@ enum {
| ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0)\
| ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-
-#define lttng_req_op(rq)
-#define lttng_req_rw(rq)   ((rq)->cmd_flags)
-#define lttng_bio_op(bio)
-#define lttng_bio_rw(bio)  ((bio)->bi_rw)
-
-#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes)
  \
-   ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
-   ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD :\
-   ( (bytes) ? RWBS_FLAG_READ :  \
-   ( 0   \
-   | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0)  \
-   | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0)  \
-   | ((rw) & REQ_META ? RWBS_FLAG_META : 0)  \
-   | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
-
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#else
 
 #define lttng_req_op(rq)
 #define lttng_req_rw(rq)   ((rq)->cmd_flags)
@@ -111,28 +94,10 @@ enum {
( (bytes) ? RWBS_FLAG_READ :  \
( 0   \
| ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0)  \
-   | ((rw) & REQ_HARDBARRIER ? RWBS_FLAG_BARRIER : 0)\
| ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0)  \
| ((rw) & REQ_META ? RWBS_FLAG_META : 0)  \
| ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
 
-#else
-
-#define lttng_req_op(rq)
-#define lttng_req_rw(rq)   ((rq)->cmd_flags)
-#define lttng_bio

Re: [lttng-dev] [PATCH lttng-modules] RFC: Drop support for kernels < 3.0

2018-11-08 Thread Mathieu Desnoyers
- On Nov 8, 2018, at 3:03 PM, Michael Jeanson mjean...@efficios.com wrote:

Hi Michael,

Can you split this patch as follows ?

- One patch updating README.md.

- Individual patches removing older kernel ifdefs for instrumentation, per 
subsystem.

- Individual patches removing each old wrapper and along with its associated 
use,

- One patch removing all backport patches,

- One patch removing old stuff from Makefile and Kbuild (I think it's missing 
from
  your patch currently),

Also, please justify in the README.md patch commit message why the 3.0 Linux 
kernel
version is chosen as backward compatibility cutoff point for now.

Thanks,

Mathieu

> Signed-off-by: Michael Jeanson 
> ---
> README.md |   2 +-
> instrumentation/events/lttng-module/block.h   |  89 +--
> instrumentation/events/lttng-module/ext4.h| 179 +-
> instrumentation/events/lttng-module/irq.h |  64 --
> instrumentation/events/lttng-module/jbd2.h|   6 -
> instrumentation/events/lttng-module/kmem.h|   7 -
> instrumentation/events/lttng-module/kvm.h |  10 -
> instrumentation/events/lttng-module/lock.h|  71 +--
> .../events/lttng-module/mm_vmscan.h   |   2 +-
> instrumentation/events/lttng-module/module.h  |  22 +-
> instrumentation/events/lttng-module/net.h |  12 -
> instrumentation/events/lttng-module/power.h   |  40 --
> instrumentation/events/lttng-module/sched.h   |  68 +--
> instrumentation/events/lttng-module/scsi.h|   8 -
> instrumentation/events/lttng-module/skb.h |   4 -
> .../events/lttng-module/workqueue.h   |  61 --
> .../events/lttng-module/writeback.h   |   4 -
> lib/bug.h |  10 +-
> lib/ringbuffer/frontend_types.h   |   1 -
> .../backport-kallsym-sym-2.6.32.patch |  37 --
> .../backport-splice-sym-2.6.32-34.patch   |  71 ---
> .../backport-tp-2.6.34-tracepoint-data.patch  | 559 --
> .../backport-tracepoint-data-2.6.32-33.patch  | 555 -
> lttng-events.c|   7 +-
> lttng-events.h|   6 +-
> lttng-kernel-version.h|   5 -
> lttng-statedump-impl.c|   9 +-
> probes/lttng-probe-lock.c |   5 -
> tests/probes/lttng-test.c |   3 +-
> wrapper/atomic.h  |   4 -
> wrapper/kstrtox.h |  47 --
> wrapper/perf.h|  25 -
> wrapper/spinlock.h|  34 --
> wrapper/tracepoint.h  |   6 -
> wrapper/uuid.h|  30 -
> wrapper/vzalloc.h |  34 --
> 36 files changed, 37 insertions(+), 2060 deletions(-)
> delete mode 100644 linux-patches/backport-kallsym-sym-2.6.32.patch
> delete mode 100644 linux-patches/backport-splice-sym-2.6.32-34.patch
> delete mode 100644 linux-patches/backport-tp-2.6.34-tracepoint-data.patch
> delete mode 100644 linux-patches/backport-tracepoint-data-2.6.32-33.patch
> delete mode 100644 wrapper/kstrtox.h
> delete mode 100644 wrapper/spinlock.h
> delete mode 100644 wrapper/uuid.h
> delete mode 100644 wrapper/vzalloc.h
> 
> diff --git a/README.md b/README.md
> index 201a579..66bf925 100644
> --- a/README.md
> +++ b/README.md
> @@ -107,7 +107,7 @@ to print traces as a human-readable text log.
> Support
> ---
> 
> -Linux kernels >= 2.6.36 are supported.
> +Linux kernels >= 3.0 are supported.
> 
> 
> Notes
> diff --git a/instrumentation/events/lttng-module/block.h
> b/instrumentation/events/lttng-module/block.h
> index e7e9449..9f77526 100644
> --- a/instrumentation/events/lttng-module/block.h
> +++ b/instrumentation/events/lttng-module/block.h
> @@ -81,24 +81,7 @@ enum {
>   | ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0)\
>   | ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
> 
> -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
> -
> -#define lttng_req_op(rq)
> -#define lttng_req_rw(rq) ((rq)->cmd_flags)
> -#define lttng_bio_op(bio)
> -#define lttng_bio_rw(bio)((bio)->bi_rw)
> -
> -#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes)  
>   \
> - ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
> - ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD :\
> - ( (bytes) ? RWBS_FLAG_READ :  \
> - ( 0   \
> - | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0)  \
> - | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0)  \
> - | ((rw) & REQ_META ? RWBS_FLAG_META : 0)  \
> - | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
> -
> -#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
> +#else

Re: [lttng-dev] [PATCH lttng-modules] RFC: Drop support for kernels < 3.0

2018-11-08 Thread Michael Jeanson
On 2018-11-08 3:15 p.m., Mathieu Desnoyers wrote:
> - On Nov 8, 2018, at 3:03 PM, Michael Jeanson mjean...@efficios.com wrote:
> 
> Hi Michael,
> 
> Can you split this patch as follows ?
> 
> - One patch updating README.md.
> 
> - Individual patches removing older kernel ifdefs for instrumentation, per 
> subsystem.
> 
> - Individual patches removing each old wrapper and along with its associated 
> use,
> 
> - One patch removing all backport patches,
> 
> - One patch removing old stuff from Makefile and Kbuild (I think it's missing 
> from
>   your patch currently),
> 
> Also, please justify in the README.md patch commit message why the 3.0 Linux 
> kernel
> version is chosen as backward compatibility cutoff point for now.
> 
> Thanks,
> 
> Mathieu

Will do, this was more about getting the discussion started.

Cheers,

Michael
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 02/30] Drop compat patches for kernels < 2.6.36

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 .../backport-kallsym-sym-2.6.32.patch |  37 --
 .../backport-splice-sym-2.6.32-34.patch   |  71 ---
 .../backport-tp-2.6.34-tracepoint-data.patch  | 559 --
 .../backport-tracepoint-data-2.6.32-33.patch  | 555 -
 4 files changed, 1222 deletions(-)
 delete mode 100644 linux-patches/backport-kallsym-sym-2.6.32.patch
 delete mode 100644 linux-patches/backport-splice-sym-2.6.32-34.patch
 delete mode 100644 linux-patches/backport-tp-2.6.34-tracepoint-data.patch
 delete mode 100644 linux-patches/backport-tracepoint-data-2.6.32-33.patch

diff --git a/linux-patches/backport-kallsym-sym-2.6.32.patch 
b/linux-patches/backport-kallsym-sym-2.6.32.patch
deleted file mode 100644
index 2e72124..000
--- a/linux-patches/backport-kallsym-sym-2.6.32.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-commit e6b48d720e39d17f06a4462be4164e1a358817de
-Author: Mathieu Desnoyers 
-Date:   Sat Sep 1 17:51:33 2012 -0700
-
-kallsyms: Re-enable export of kallsyms_lookup (backport)
-
-Backport of part of commit:
-
-commit f60d24d2ad04977b0bd9e3eb35dba2d2fa569af9
-Author: Frederic Weisbecker 
-Date:   Tue Nov 10 10:17:07 2009 +0100
-
-hw-breakpoints: Fix broken hw-breakpoint sample module
-
-The hw-breakpoint sample module has been broken during the
-hw-breakpoint internals refactoring. Propagate the changes
-to it.
-
-Reported-by: "K. Prasad" 
-Signed-off-by: Frederic Weisbecker 
-
-for kernel 2.6.32.x. (just the symbol export)
-
-Signed-off-by: Mathieu Desnoyers 
-
-diff --git a/kernel/kallsyms.c b/kernel/kallsyms.c
-index 8b6b8b6..8e5288a 100644
 a/kernel/kallsyms.c
-+++ b/kernel/kallsyms.c
-@@ -181,6 +181,7 @@ unsigned long kallsyms_lookup_name(const char *name)
-   }
-   return module_kallsyms_lookup_name(name);
- }
-+EXPORT_SYMBOL_GPL(kallsyms_lookup_name);
- 
- int kallsyms_on_each_symbol(int (*fn)(void *, const char *, struct module *,
- unsigned long),
diff --git a/linux-patches/backport-splice-sym-2.6.32-34.patch 
b/linux-patches/backport-splice-sym-2.6.32-34.patch
deleted file mode 100644
index 00be3b5..000
--- a/linux-patches/backport-splice-sym-2.6.32-34.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-commit f0d902f497ee2fb747086322a31925c7fb351d7a
-Author: Mathieu Desnoyers 
-Date:   Sat Sep 1 17:47:36 2012 -0700
-
-mm: export generic_pipe_buf_*() to modules (backport)
-
-Backport for 2.6.32.x to 2.6.34.x of commits:
-
-commit 51921cb746f56983db5a373ca68deb2b0d3ddf01
-Author: Miklos Szeredi 
-Date:   Wed May 26 08:44:22 2010 +0200
-
-mm: export generic_pipe_buf_*() to modules
-
-This is needed by fuse device code which wants to create pipe buffers.
-Signed-off-by: Miklos Szeredi 
-
-Signed-off-by: Mathieu Desnoyers 
-
-diff --git a/fs/pipe.c b/fs/pipe.c
-index d0cc080..0eb6f53 100644
 a/fs/pipe.c
-+++ b/fs/pipe.c
-@@ -222,6 +222,7 @@ void *generic_pipe_buf_map(struct pipe_inode_info *pipe,
- 
-   return kmap(buf->page);
- }
-+EXPORT_SYMBOL(generic_pipe_buf_map);
- 
- /**
-  * generic_pipe_buf_unmap - unmap a previously mapped pipe buffer
-@@ -241,6 +242,7 @@ void generic_pipe_buf_unmap(struct pipe_inode_info *pipe,
-   } else
-   kunmap(buf->page);
- }
-+EXPORT_SYMBOL(generic_pipe_buf_unmap);
- 
- /**
-  * generic_pipe_buf_steal - attempt to take ownership of a &pipe_buffer
-@@ -271,6 +273,7 @@ int generic_pipe_buf_steal(struct pipe_inode_info *pipe,
- 
-   return 1;
- }
-+EXPORT_SYMBOL(generic_pipe_buf_steal);
- 
- /**
-  * generic_pipe_buf_get - get a reference to a &struct pipe_buffer
-@@ -286,6 +289,7 @@ void generic_pipe_buf_get(struct pipe_inode_info *pipe, 
struct pipe_buffer *buf)
- {
-   page_cache_get(buf->page);
- }
-+EXPORT_SYMBOL(generic_pipe_buf_get);
- 
- /**
-  * generic_pipe_buf_confirm - verify contents of the pipe buffer
-@@ -301,6 +305,7 @@ int generic_pipe_buf_confirm(struct pipe_inode_info *info,
- {
-   return 0;
- }
-+EXPORT_SYMBOL(generic_pipe_buf_confirm);
- 
- /**
-  * generic_pipe_buf_release - put a reference to a &struct pipe_buffer
-@@ -315,6 +320,7 @@ void generic_pipe_buf_release(struct pipe_inode_info *pipe,
- {
-   page_cache_release(buf->page);
- }
-+EXPORT_SYMBOL(generic_pipe_buf_release);
- 
- static const struct pipe_buf_operations anon_pipe_buf_ops = {
-   .can_merge = 1,
diff --git a/linux-patches/backport-tp-2.6.34-tracepoint-data.patch 
b/linux-patches/backport-tp-2.6.34-tracepoint-data.patch
deleted file mode 100644
index 0ffd7e1..000
--- a/linux-patches/backport-tp-2.6.34-tracepoint-data.patch
+++ /dev/null
@@ -1,559 +0,0 @@
-commit 2c2a566b64b4254c530fb0cb30e8a739bac9
-Author: Mathieu Desnoyers 
-Date:   Sat Sep 1 17:45:09 2012 -0700
-
-tracing: Let tracepoints have data passed to tracepoint callbacks 
(backport)
-
-Backport of commit 

[lttng-dev] [RFC PATCH lttng-modules v2 01/30] Bump minimum kernel version to 3.0

2018-11-08 Thread Michael Jeanson
Upstream Linux 3.0 was released 7 years ago, the oldest longterm release
still supported is 3.16. On the distro kernels side, we still cover :

 RHEL / CentOS 7 and up
 SLES11 SP2 and up
 SLES12 and up
 Ubuntu 12.04 (Precise) and up
 Debian 7 (Wheezy) and up
 Fedora 16 and up

Signed-off-by: Michael Jeanson 
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 201a579..66bf925 100644
--- a/README.md
+++ b/README.md
@@ -107,7 +107,7 @@ to print traces as a human-readable text log.
 Support
 ---
 
-Linux kernels >= 2.6.36 are supported.
+Linux kernels >= 3.0 are supported.
 
 
 Notes
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 04/30] Drop support for kernels < 3.0 from perf.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 wrapper/perf.h | 25 -
 1 file changed, 25 deletions(-)

diff --git a/wrapper/perf.h b/wrapper/perf.h
index 48e256c..4a7f6d8 100644
--- a/wrapper/perf.h
+++ b/wrapper/perf.h
@@ -22,8 +22,6 @@ wrapper_perf_event_create_kernel_counter(struct 
perf_event_attr *attr,
return perf_event_create_kernel_counter(attr, cpu, task, callback, 
NULL);
 }
 #else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 static inline struct perf_event *
 wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
int cpu,
@@ -32,29 +30,6 @@ wrapper_perf_event_create_kernel_counter(struct 
perf_event_attr *attr,
 {
return perf_event_create_kernel_counter(attr, cpu, task, callback);
 }
-#else /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
-static inline struct perf_event *
-wrapper_perf_event_create_kernel_counter(struct perf_event_attr *attr,
-   int cpu,
-   struct task_struct *task,
-   perf_overflow_handler_t callback)
-{
-   pid_t pid;
-
-   if (!task)
-   pid = -1;
-   else
-   pid = task->pid;
-
-   return perf_event_create_kernel_counter(attr, cpu, pid, callback);
-}
-
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36))
-#define local64_read(l)atomic64_read(l)
-#endif
-
 #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
 
 #endif /* CONFIG_PERF_EVENTS */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 03/30] Drop support for kernels < 3.0 from atomic.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 wrapper/atomic.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/wrapper/atomic.h b/wrapper/atomic.h
index 51920c4..5ead899 100644
--- a/wrapper/atomic.h
+++ b/wrapper/atomic.h
@@ -11,11 +11,7 @@
 #define _LTTNG_WRAPPER_ATOMIC_H
 
 #include 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 #include 
-#else
-#include 
-#endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,16,0))
 static inline void lttng_smp_mb__before_atomic(void)
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 06/30] Drop vzalloc.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lttng-events.c|  5 ++---
 wrapper/vzalloc.h | 34 --
 2 files changed, 2 insertions(+), 37 deletions(-)
 delete mode 100644 wrapper/vzalloc.h

diff --git a/lttng-events.c b/lttng-events.c
index f1be602..e3a8425 100644
--- a/lttng-events.c
+++ b/lttng-events.c
@@ -40,7 +40,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 
@@ -130,7 +129,7 @@ struct lttng_session *lttng_session_create(void)
GFP_KERNEL);
if (!metadata_cache)
goto err_free_session;
-   metadata_cache->data = lttng_vzalloc(METADATA_CACHE_DEFAULT_SIZE);
+   metadata_cache->data = vzalloc(METADATA_CACHE_DEFAULT_SIZE);
if (!metadata_cache->data)
goto err_free_cache;
metadata_cache->cache_alloc = METADATA_CACHE_DEFAULT_SIZE;
@@ -1692,7 +1691,7 @@ int lttng_metadata_printf(struct lttng_session *session,
tmp_cache_alloc_size = max_t(unsigned int,
session->metadata_cache->cache_alloc + len,
session->metadata_cache->cache_alloc << 1);
-   tmp_cache_realloc = lttng_vzalloc(tmp_cache_alloc_size);
+   tmp_cache_realloc = vzalloc(tmp_cache_alloc_size);
if (!tmp_cache_realloc)
goto err;
if (session->metadata_cache->data) {
diff --git a/wrapper/vzalloc.h b/wrapper/vzalloc.h
deleted file mode 100644
index eedaf8d..000
--- a/wrapper/vzalloc.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
- *
- * wrapper/vzalloc.h
- *
- * Copyright (C) 2015 Michael Jeanson 
- */
-
-#ifndef _LTTNG_WRAPPER_VZALLOC_H
-#define _LTTNG_WRAPPER_VZALLOC_H
-
-#include 
-#include 
-
-#if LTTNG_KERNEL_RANGE(2,6,36, 2,6,37)
-static inline
-void *lttng_vzalloc(unsigned long size)
-{
-   void *ret;
-   ret = vmalloc(size);
-   if (!ret)
-   return NULL;
-   memset(ret, 0, size);
-   return ret;
-}
-#else
-static inline
-void *lttng_vzalloc(unsigned long size)
-{
-   return vzalloc(size);
-}
-#endif
-
-
-#endif /* _LTTNG_WRAPPER_VZALLOC_H */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 08/30] Drop kstrtox.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 tests/probes/lttng-test.c |  3 +--
 wrapper/kstrtox.h | 47 ---
 2 files changed, 1 insertion(+), 49 deletions(-)
 delete mode 100644 wrapper/kstrtox.h

diff --git a/tests/probes/lttng-test.c b/tests/probes/lttng-test.c
index 42e48cf..d127818 100644
--- a/tests/probes/lttng-test.c
+++ b/tests/probes/lttng-test.c
@@ -16,7 +16,6 @@
 #include 
 #include 
 #include 
-#include 
 
 #define TP_MODULE_NOAUTOLOAD
 #define LTTNG_PACKAGE_BUILD
@@ -69,7 +68,7 @@ ssize_t lttng_test_filter_event_write(struct file *file, 
const char __user *user
int ret;
 
/* Get the number of iterations */
-   ret = lttng_kstrtouint_from_user(user_buf, count, 10, &nr_iter);
+   ret = kstrtouint_from_user(user_buf, count, 10, &nr_iter);
if (ret) {
written = ret;
goto end;
diff --git a/wrapper/kstrtox.h b/wrapper/kstrtox.h
deleted file mode 100644
index b0c6cf8..000
--- a/wrapper/kstrtox.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
- *
- * wrapper/kstrtox.h
- *
- * Copyright (C) 2015 Michael Jeanson 
- */
-
-#ifndef _LTTNG_WRAPPER_KSTRTOX_H
-#define _LTTNG_WRAPPER_KSTRTOX_H
-
-#include 
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
-
-#include 
-
-/* Excludes final \0. */
-#define LTTNG_MAX_UINT_CHAR 10
-
-static inline
-int __must_check lttng_kstrtouint_from_user(const char __user *ubuf,
-   size_t count, unsigned int base, unsigned int *res)
-{
-   unsigned int _res;
-   char kbuf[LTTNG_MAX_UINT_CHAR + 1], *endptr;
-
-   memset(kbuf, 0, sizeof(kbuf));
-   if (copy_from_user(kbuf, ubuf, min_t(size_t, LTTNG_MAX_UINT_CHAR, 
count)))
-   return -EFAULT;
-
-   _res = simple_strtoul(kbuf, &endptr, base);
-   if (!endptr)
-   return -EINVAL;
-
-   *res = _res;
-   return 0;
-}
-#else
-static inline
-int __must_check lttng_kstrtouint_from_user(const char __user *ubuf,
-   size_t count, unsigned int base, unsigned int *res)
-{
-   return kstrtouint_from_user(ubuf, count, base, res);
-}
-#endif
-
-#endif /* _LTTNG_WRAPPER_KSTRTOX_H */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 07/30] Drop uuid.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lttng-events.c |  2 +-
 lttng-events.h |  2 +-
 wrapper/uuid.h | 30 --
 3 files changed, 2 insertions(+), 32 deletions(-)
 delete mode 100644 wrapper/uuid.h

diff --git a/lttng-events.c b/lttng-events.c
index e3a8425..566080a 100644
--- a/lttng-events.c
+++ b/lttng-events.c
@@ -27,8 +27,8 @@
 #include 
 #include 
 #include 
+#include 
 
-#include 
 #include/* for wrapper_vmalloc_sync_all() */
 #include 
 #include 
diff --git a/lttng-events.h b/lttng-events.h
index f5a7d23..f62e0cb 100644
--- a/lttng-events.h
+++ b/lttng-events.h
@@ -15,7 +15,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
diff --git a/wrapper/uuid.h b/wrapper/uuid.h
deleted file mode 100644
index 465754e..000
--- a/wrapper/uuid.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
- *
- * wrapper/uuid.h
- *
- * Copyright (C) 2011-2012 Mathieu Desnoyers 
- */
-
-#ifndef _LTTNG_WRAPPER_UUID_H
-#define _LTTNG_WRAPPER_UUID_H
-
-#include 
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-#include 
-#else
-
-#include 
-
-typedef struct {
-   __u8 b[16];
-} uuid_le;
-
-static inline
-void uuid_le_gen(uuid_le *u)
-{
-   generate_random_uuid(u->b);
-}
-
-#endif
-#endif /* _LTTNG_WRAPPER_UUID_H */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 05/30] Drop support for kernels < 3.0 from tracepoint.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 wrapper/tracepoint.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/wrapper/tracepoint.h b/wrapper/tracepoint.h
index 0c5a296..6ee4217 100644
--- a/wrapper/tracepoint.h
+++ b/wrapper/tracepoint.h
@@ -14,12 +14,6 @@
 #include 
 #include 
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
-
-#define DECLARE_EVENT_CLASS(name, proto, args, tstruct, assign, print)
-
-#endif
-
 #ifndef HAVE_KABI_2635_TRACEPOINT
 
 #define kabi_2635_tracepoint_probe_register tracepoint_probe_register
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 10/30] Drop support for kernels < 3.0 from lib

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lib/bug.h | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/lib/bug.h b/lib/bug.h
index 8ddf2b0..0f3b30b 100644
--- a/lib/bug.h
+++ b/lib/bug.h
@@ -8,14 +8,6 @@
 #ifndef _LTTNG_BUG_H
 #define _LTTNG_BUG_H
 
-#include 
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
-#define LTTNG_BUILD_BUG_ON(cond) BUILD_BUG_ON(cond)
-#else
-#define LTTNG_BUILD_BUG_ON(cond) MAYBE_BUILD_BUG_ON(cond)
-#endif
-
 /**
  * BUILD_RUNTIME_BUG_ON - check condition at build (if constant) or runtime
  * @condition: the condition which should be false.
@@ -28,7 +20,7 @@
 #define BUILD_RUNTIME_BUG_ON(condition)\
do {\
if (__builtin_constant_p(condition))\
-   LTTNG_BUILD_BUG_ON(condition);  \
+   BUILD_BUG_ON(condition);\
else\
BUG_ON(condition);  \
} while (0)
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 09/30] Drop spinlock.h wrapper

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lib/ringbuffer/frontend_types.h |  1 -
 lttng-statedump-impl.c  |  5 ++---
 wrapper/spinlock.h  | 34 -
 3 files changed, 2 insertions(+), 38 deletions(-)
 delete mode 100644 wrapper/spinlock.h

diff --git a/lib/ringbuffer/frontend_types.h b/lib/ringbuffer/frontend_types.h
index 2b0c932..837a926 100644
--- a/lib/ringbuffer/frontend_types.h
+++ b/lib/ringbuffer/frontend_types.h
@@ -15,7 +15,6 @@
 #include 
 #include 
 #include 
-#include 
 #include  /* For per-CPU read-side 
iterator */
 #include 
 
diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
index 6d91a2c..8ce50c0 100644
--- a/lttng-statedump-impl.c
+++ b/lttng-statedump-impl.c
@@ -37,7 +37,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -373,12 +372,12 @@ int lttng_list_interrupts(struct lttng_session *session)
irq_desc_get_chip(desc)->name ? : "unnamed_irq_chip";
 
local_irq_save(flags);
-   wrapper_desc_spin_lock(&desc->lock);
+   raw_spin_lock(&desc->lock);
for (action = desc->action; action; action = action->next) {
trace_lttng_statedump_interrupt(session,
irq, irq_chip_name, action);
}
-   wrapper_desc_spin_unlock(&desc->lock);
+   raw_spin_unlock(&desc->lock);
local_irq_restore(flags);
}
return 0;
diff --git a/wrapper/spinlock.h b/wrapper/spinlock.h
deleted file mode 100644
index b3570d4..000
--- a/wrapper/spinlock.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
- *
- * wrapper/spinlock.h
- *
- * Copyright (C) 2011-2012 Mathieu Desnoyers 
- */
-
-#ifndef _LTTNG_WRAPPER_SPINLOCK_H
-#define _LTTNG_WRAPPER_SPINLOCK_H
-
-#include 
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-
-#include 
-
-#define raw_spin_lock_init(lock)   \
-   do {\
-   raw_spinlock_t __lock = __RAW_SPIN_LOCK_UNLOCKED;   \
-   memcpy(lock, &__lock, sizeof(lock));\
-   } while (0)
-
-#define raw_spin_is_locked(lock)   __raw_spin_is_locked(lock)
-
-#define wrapper_desc_spin_lock(lock)   spin_lock(lock)
-#define wrapper_desc_spin_unlock(lock) spin_unlock(lock)
-
-#else
-
-#define wrapper_desc_spin_lock(lock)   raw_spin_lock(lock)
-#define wrapper_desc_spin_unlock(lock) raw_spin_unlock(lock)
-
-#endif
-#endif /* _LTTNG_WRAPPER_SPINLOCK_H */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 11/30] Drop support for kernels < 3.0 from lttng-events.h

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lttng-events.h | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/lttng-events.h b/lttng-events.h
index f62e0cb..1903706 100644
--- a/lttng-events.h
+++ b/lttng-events.h
@@ -716,7 +716,7 @@ int lttng_add_migratable_to_ctx(struct lttng_ctx **ctx)
 
 int lttng_add_callstack_to_ctx(struct lttng_ctx **ctx, int type);
 
-#if defined(CONFIG_PERF_EVENTS) && (LINUX_VERSION_CODE >= 
KERNEL_VERSION(2,6,33))
+#if defined(CONFIG_PERF_EVENTS)
 int lttng_add_perf_counter_to_ctx(uint32_t type,
  uint64_t config,
  const char *name,
@@ -891,8 +891,6 @@ int lttng_calibrate(struct lttng_kernel_calibrate 
*calibrate);
 extern const struct file_operations lttng_tracepoint_list_fops;
 extern const struct file_operations lttng_syscall_list_fops;
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
 #define TRACEPOINT_HAS_DATA_ARG
-#endif
 
 #endif /* _LTTNG_EVENTS_H */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 13/30] Drop support for kernels < 3.0 from lttng-statedump-impl.c

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lttng-statedump-impl.c | 4 
 1 file changed, 4 deletions(-)

diff --git a/lttng-statedump-impl.c b/lttng-statedump-impl.c
index 8ce50c0..dc03750 100644
--- a/lttng-statedump-impl.c
+++ b/lttng-statedump-impl.c
@@ -353,10 +353,6 @@ int lttng_enumerate_vm_maps(struct lttng_session *session)
 
 #ifdef CONFIG_LTTNG_HAS_LIST_IRQ
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
-#define irq_desc_get_chip(desc) get_irq_desc_chip(desc)
-#endif
-
 static
 int lttng_list_interrupts(struct lttng_session *session)
 {
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 12/30] Drop support for kernels < 3.0 from lttng-kernel-version.h

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 lttng-kernel-version.h | 5 -
 1 file changed, 5 deletions(-)

diff --git a/lttng-kernel-version.h b/lttng-kernel-version.h
index 6b545db..26f816c 100644
--- a/lttng-kernel-version.h
+++ b/lttng-kernel-version.h
@@ -11,12 +11,7 @@
 #define _LTTNG_KERNEL_VERSION_H
 
 #include 
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
 #include 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) */
-#include 
-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33)) */
 
 /*
  * This macro checks if the kernel version is between the two specified
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 14/30] Drop support for kernels < 3.0 from block instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/block.h | 89 +
 1 file changed, 1 insertion(+), 88 deletions(-)

diff --git a/instrumentation/events/lttng-module/block.h 
b/instrumentation/events/lttng-module/block.h
index e7e9449..9f77526 100644
--- a/instrumentation/events/lttng-module/block.h
+++ b/instrumentation/events/lttng-module/block.h
@@ -81,24 +81,7 @@ enum {
| ((rw) & REQ_FLUSH ? RWBS_FLAG_FLUSH : 0)\
| ((rw) & REQ_FUA ? RWBS_FLAG_FUA : 0))
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-
-#define lttng_req_op(rq)
-#define lttng_req_rw(rq)   ((rq)->cmd_flags)
-#define lttng_bio_op(bio)
-#define lttng_bio_rw(bio)  ((bio)->bi_rw)
-
-#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes)
  \
-   ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
-   ( (rw) & REQ_DISCARD ? RWBS_FLAG_DISCARD :\
-   ( (bytes) ? RWBS_FLAG_READ :  \
-   ( 0   \
-   | ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0)  \
-   | ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0)  \
-   | ((rw) & REQ_META ? RWBS_FLAG_META : 0)  \
-   | ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
-
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
+#else
 
 #define lttng_req_op(rq)
 #define lttng_req_rw(rq)   ((rq)->cmd_flags)
@@ -111,28 +94,10 @@ enum {
( (bytes) ? RWBS_FLAG_READ :  \
( 0   \
| ((rw) & REQ_RAHEAD ? RWBS_FLAG_RAHEAD : 0)  \
-   | ((rw) & REQ_HARDBARRIER ? RWBS_FLAG_BARRIER : 0)\
| ((rw) & REQ_SYNC ? RWBS_FLAG_SYNC : 0)  \
| ((rw) & REQ_META ? RWBS_FLAG_META : 0)  \
| ((rw) & REQ_SECURE ? RWBS_FLAG_SECURE : 0))
 
-#else
-
-#define lttng_req_op(rq)
-#define lttng_req_rw(rq)   ((rq)->cmd_flags)
-#define lttng_bio_op(bio)
-#define lttng_bio_rw(bio)  ((bio)->bi_rw)
-
-#define blk_rwbs_ctf_integer(type, rwbs, op, rw, bytes)
  \
-   ctf_integer(type, rwbs, ((rw) & WRITE ? RWBS_FLAG_WRITE : \
-   ( (rw) & (1 << BIO_RW_DISCARD) ? RWBS_FLAG_DISCARD :  \
-   ( (bytes) ? RWBS_FLAG_READ :  \
-   ( 0   \
-   | ((rw) & (1 << BIO_RW_AHEAD) ? RWBS_FLAG_RAHEAD : 0) \
-   | ((rw) & (1 << BIO_RW_SYNCIO) ? RWBS_FLAG_SYNC : 0)  \
-   | ((rw) & (1 << BIO_RW_META) ? RWBS_FLAG_META : 0)\
-   | ((rw) & (1 << BIO_RW_BARRIER) ? RWBS_FLAG_BARRIER : 
0))
-
 #endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
@@ -653,15 +618,9 @@ LTTNG_TRACEPOINT_EVENT(block_bio_bounce,
  */
 LTTNG_TRACEPOINT_EVENT(block_bio_complete,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
TP_PROTO(struct request_queue *q, struct bio *bio, int error),
 
TP_ARGS(q, bio, error),
-#else
-   TP_PROTO(struct request_queue *q, struct bio *bio),
-
-   TP_ARGS(q, bio),
-#endif
 
TP_FIELDS(
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0))
@@ -679,11 +638,7 @@ LTTNG_TRACEPOINT_EVENT(block_bio_complete,
 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
ctf_integer(sector_t, sector, bio->bi_sector)
ctf_integer(unsigned int, nr_sector, bio->bi_size >> 9)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
ctf_integer(int, error, error)
-#else
-   ctf_integer(int, error, 0)
-#endif
blk_rwbs_ctf_integer(unsigned int, rwbs,
lttng_bio_op(bio), lttng_bio_rw(bio), bio->bi_size)
 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0)) */
@@ -938,43 +893,17 @@ LTTNG_TRACEPOINT_EVENT(block_plug,
 
 LTTNG_TRACEPOINT_EVENT_CLASS(block_unplug,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit),
 
TP_ARGS(q, depth, explicit),
-#else
-   TP_PROTO(struct request_queue *q),
-
-   TP_ARGS(q),
-#endif
 
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(int, nr_rq, depth)
-#else
-   ctf_integer(int, nr_rq, q->rq.count[READ] + q->rq.count[WRITE])
-#endif
ctf_integer(pid_t, tid, current->pid)
ctf_array_text(char, comm, current->comm, TASK_COMM_LEN)
)
 )
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
-

[lttng-dev] [RFC PATCH lttng-modules v2 16/30] Drop support for kernels < 3.0 from irq instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/irq.h | 64 ---
 1 file changed, 64 deletions(-)

diff --git a/instrumentation/events/lttng-module/irq.h 
b/instrumentation/events/lttng-module/irq.h
index 6f66a5e..71553e6 100644
--- a/instrumentation/events/lttng-module/irq.h
+++ b/instrumentation/events/lttng-module/irq.h
@@ -61,7 +61,6 @@ LTTNG_TRACEPOINT_EVENT(irq_handler_exit,
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
 
TP_PROTO(unsigned int vec_nr),
@@ -120,69 +119,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, 
softirq_raise,
 
TP_ARGS(vec_nr)
 )
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
-LTTNG_TRACEPOINT_EVENT_CLASS(irq_softirq,
-
-   TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
-
-   TP_ARGS(h, vec),
-
-   TP_FIELDS(
-   ctf_integer(unsigned int, vec, (int)(h - vec))
-   )
-)
-
-/**
- * softirq_entry - called immediately before the softirq handler
- * @h: pointer to struct softirq_action
- * @vec: pointer to first struct softirq_action in softirq_vec array
- *
- * When used in combination with the softirq_exit tracepoint
- * we can determine the softirq handler runtine.
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_entry,
-
-   irq_softirq_entry,
-
-   TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
-
-   TP_ARGS(h, vec)
-)
-
-/**
- * softirq_exit - called immediately after the softirq handler returns
- * @h: pointer to struct softirq_action
- * @vec: pointer to first struct softirq_action in softirq_vec array
- *
- * When used in combination with the softirq_entry tracepoint
- * we can determine the softirq handler runtine.
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_exit,
-
-   irq_softirq_exit,
-
-   TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
-
-   TP_ARGS(h, vec)
-)
-
-/**
- * softirq_raise - called immediately when a softirq is raised
- * @h: pointer to struct softirq_action
- * @vec: pointer to first struct softirq_action in softirq_vec array
- *
- * When used in combination with the softirq_entry tracepoint
- * we can determine the softirq raise to run latency.
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(irq_softirq, softirq_raise,
-
-   irq_softirq_raise,
-
-   TP_PROTO(struct softirq_action *h, struct softirq_action *vec),
-
-   TP_ARGS(h, vec)
-)
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) */
 
 #endif /*  LTTNG_TRACE_IRQ_H */
 
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 17/30] Drop support for kernels < 3.0 from jbd2 instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/jbd2.h | 6 --
 1 file changed, 6 deletions(-)

diff --git a/instrumentation/events/lttng-module/jbd2.h 
b/instrumentation/events/lttng-module/jbd2.h
index 10e3073..a760da2 100644
--- a/instrumentation/events/lttng-module/jbd2.h
+++ b/instrumentation/events/lttng-module/jbd2.h
@@ -9,13 +9,11 @@
 #include 
 #include 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 #ifndef _TRACE_JBD2_DEF
 #define _TRACE_JBD2_DEF
 struct transaction_chp_stats_s;
 struct transaction_run_stats_s;
 #endif
-#endif
 
 LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint,
 
@@ -103,7 +101,6 @@ LTTNG_TRACEPOINT_EVENT(jbd2_submit_inode_data,
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 LTTNG_TRACEPOINT_EVENT(jbd2_run_stats,
TP_PROTO(dev_t dev, unsigned long tid,
 struct transaction_run_stats_s *stats),
@@ -139,9 +136,7 @@ LTTNG_TRACEPOINT_EVENT(jbd2_checkpoint_stats,
ctf_integer(__u32, dropped, stats->cs_dropped)
)
 )
-#endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(jbd2_update_log_tail,
 #else
@@ -161,7 +156,6 @@ LTTNG_TRACEPOINT_EVENT(jbd2_cleanup_journal_tail,
ctf_integer(unsigned long, freed, freed)
)
 )
-#endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT(jbd2_write_superblock,
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 15/30] Drop support for kernels < 3.0 from ext4 instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/ext4.h | 179 ++---
 1 file changed, 15 insertions(+), 164 deletions(-)

diff --git a/instrumentation/events/lttng-module/ext4.h 
b/instrumentation/events/lttng-module/ext4.h
index 307021a..b2ca8a7 100644
--- a/instrumentation/events/lttng-module/ext4.h
+++ b/instrumentation/events/lttng-module/ext4.h
@@ -74,7 +74,6 @@ LTTNG_TRACEPOINT_EVENT(ext4_allocate_inode,
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 LTTNG_TRACEPOINT_EVENT(ext4_evict_inode,
TP_PROTO(struct inode *inode),
 
@@ -122,7 +121,6 @@ LTTNG_TRACEPOINT_EVENT(ext4_begin_ordered_truncate,
ctf_integer(loff_t, new_size, new_size)
)
 )
-#endif
 
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__write_begin,
 
@@ -203,20 +201,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__write_end, 
ext4_da_write_end,
TP_ARGS(inode, pos, len, copied)
 )
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
-LTTNG_TRACEPOINT_EVENT(ext4_writepage,
-   TP_PROTO(struct inode *inode, struct page *page),
-
-   TP_ARGS(inode, page),
-
-   TP_FIELDS(
-   ctf_integer(dev_t, dev, inode->i_sb->s_dev)
-   ctf_integer(ino_t, ino, inode->i_ino)
-   ctf_integer(pgoff_t, index, page->index)
-   )
-)
-#endif
-
 LTTNG_TRACEPOINT_EVENT(ext4_da_writepages,
TP_PROTO(struct inode *inode, struct writeback_control *wbc),
 
@@ -230,16 +214,8 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_writepages,
ctf_integer(loff_t, range_start, wbc->range_start)
ctf_integer(loff_t, range_end, wbc->range_end)
ctf_integer(pgoff_t, writeback_index, 
inode->i_mapping->writeback_index)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(int, sync_mode, wbc->sync_mode)
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37))
-   ctf_integer(char, nonblocking, wbc->nonblocking)
-#endif
ctf_integer(char, for_kupdate, wbc->for_kupdate)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,39))
-   ctf_integer(char, for_reclaim, wbc->for_reclaim)
-#endif
ctf_integer(char, range_cyclic, wbc->range_cyclic)
)
 )
@@ -277,9 +253,7 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_write_pages,
ctf_integer(unsigned long, first_page, mpd->first_page)
ctf_integer(int, io_done, mpd->io_done)
ctf_integer(int, pages_written, mpd->pages_written)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(int, sync_mode, mpd->wbc->sync_mode)
-#endif
)
 )
 
@@ -316,22 +290,10 @@ LTTNG_TRACEPOINT_EVENT(ext4_da_writepages_result,
ctf_integer(int, pages_written, pages_written)
ctf_integer(long, pages_skipped, wbc->pages_skipped)
ctf_integer(pgoff_t, writeback_index, 
inode->i_mapping->writeback_index)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(int, sync_mode, wbc->sync_mode)
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
-   ctf_integer(char, encountered_congestion, 
wbc->encountered_congestion)
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,1,0))
-   ctf_integer(char, more_io, wbc->more_io)
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,35))
-   ctf_integer(char, no_nrwrite_index_update, 
wbc->no_nrwrite_index_update)
-#endif
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
 LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op,
TP_PROTO(struct page *page),
 
@@ -344,14 +306,12 @@ LTTNG_TRACEPOINT_EVENT_CLASS(ext4__page_op,
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_writepage,
 
TP_PROTO(struct page *page),
 
TP_ARGS(page)
 )
-#endif
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__page_op, ext4_readpage,
 
@@ -413,8 +373,6 @@ LTTNG_TRACEPOINT_EVENT(ext4_invalidatepage,
 
 #endif
 
-#endif
-
 LTTNG_TRACEPOINT_EVENT(ext4_discard_blocks,
TP_PROTO(struct super_block *sb, unsigned long long blk,
unsigned long long count),
@@ -461,91 +419,46 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(ext4__mb_new_pa, 
ext4_mb_new_group_pa,
 
 LTTNG_TRACEPOINT_EVENT(ext4_mb_release_inode_pa,
TP_PROTO(
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,40))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
-struct super_block *sb,
-struct inode *inode,
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
-struct super_block *sb,
-struct ext4_allocation_context *ac,
-#else
-struct ext4_allocation_context *ac,
-#endif
-#endif
 struct ext4_prealloc_space *pa,
 unsigned long long block, unsigned int count),
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
TP_ARGS(pa, block, count),
-#elif (LINUX_VE

[lttng-dev] [RFC PATCH lttng-modules v2 19/30] Drop support for kernels < 3.0 from kvm instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/kvm.h | 10 --
 1 file changed, 10 deletions(-)

diff --git a/instrumentation/events/lttng-module/kvm.h 
b/instrumentation/events/lttng-module/kvm.h
index 62030fc..4868d89 100644
--- a/instrumentation/events/lttng-module/kvm.h
+++ b/instrumentation/events/lttng-module/kvm.h
@@ -8,8 +8,6 @@
 #undef TRACE_SYSTEM
 #define TRACE_SYSTEM kvm
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
-
 LTTNG_TRACEPOINT_EVENT(kvm_userspace_exit,
TP_PROTO(__u32 reason, int errno),
TP_ARGS(reason, errno),
@@ -19,7 +17,6 @@ LTTNG_TRACEPOINT_EVENT(kvm_userspace_exit,
ctf_integer(int, errno, errno)
)
 )
-#endif
 
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(3,6,0))
 #if defined(__KVM_HAVE_IOAPIC)
@@ -142,8 +139,6 @@ LTTNG_TRACEPOINT_EVENT(kvm_mmio,
 
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
-
 #define kvm_fpu_load_symbol\
{0, "unload"},  \
{1, "load"}
@@ -187,9 +182,6 @@ LTTNG_TRACEPOINT_EVENT(kvm_age_page,
)
 )
 #endif
-#endif
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
 
 #ifdef CONFIG_KVM_ASYNC_PF
 LTTNG_TRACEPOINT_EVENT_CLASS(kvm_async_get_page_class,
@@ -276,8 +268,6 @@ LTTNG_TRACEPOINT_EVENT(
 
 #endif
 
-#endif
-
 #endif /* LTTNG_TRACE_KVM_MAIN_H */
 
 /* This part must be outside protection */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 20/30] Drop support for kernels < 3.0 from lock instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/lock.h | 71 +-
 probes/lttng-probe-lock.c  |  5 --
 2 files changed, 2 insertions(+), 74 deletions(-)

diff --git a/instrumentation/events/lttng-module/lock.h 
b/instrumentation/events/lttng-module/lock.h
index 49e7811..c8cdc55 100644
--- a/instrumentation/events/lttng-module/lock.h
+++ b/instrumentation/events/lttng-module/lock.h
@@ -1,16 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0 */
-#include 
 
 #undef TRACE_SYSTEM
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
 #define TRACE_SYSTEM lock
-#else
-#define TRACE_SYSTEM lockdep
-#define TRACE_INCLUDE_FILE lock
-#if defined(_TRACE_LOCKDEP_H)
-#define LTTNG_TRACE_LOCK_H
-#endif
-#endif
 
 #if !defined(LTTNG_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ)
 #define LTTNG_TRACE_LOCK_H
@@ -31,14 +22,10 @@ LTTNG_TRACEPOINT_EVENT(lock_acquire,
TP_FIELDS(
ctf_integer(unsigned int, flags, (trylock ? 1 : 0) | (read ? 2 
: 0))
ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
ctf_integer_hex(void *, lockdep_addr, lock)
-#endif
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-
 LTTNG_TRACEPOINT_EVENT_CLASS(lock,
 
TP_PROTO(struct lockdep_map *lock, unsigned long ip),
@@ -74,63 +61,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(lock, lock_acquired,
TP_ARGS(lock, ip)
 )
 
-#endif
-
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
-
-LTTNG_TRACEPOINT_EVENT(lock_release,
-
-   TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip),
-
-   TP_ARGS(lock, nested, ip),
-
-   TP_FIELDS(
-   ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
-   ctf_integer_hex(void *, lockdep_addr, lock)
-#endif
-   )
-)
-
-#ifdef CONFIG_LOCK_STAT
-
-LTTNG_TRACEPOINT_EVENT(lock_contended,
-
-   TP_PROTO(struct lockdep_map *lock, unsigned long ip),
-
-   TP_ARGS(lock, ip),
-
-   TP_FIELDS(
-   ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
-   ctf_integer_hex(void *, lockdep_addr, lock)
-#endif
-   )
-)
-
-LTTNG_TRACEPOINT_EVENT(lock_acquired,
-
-   TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime),
-
-   TP_ARGS(lock, ip, waittime),
-
-   TP_FIELDS(
-   ctf_string(name, lock->name)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,34))
-   ctf_integer(s64, wait_nsec, wait_nsec)
-   ctf_integer_hex(void *, lockdep_addr, lock)
-#else
-   ctf_integer(unsigned long, wait_usec, (unsigned long) waittime)
-   ctf_integer(unsigned long, wait_nsec_rem, do_div(waittime, 
NSEC_PER_USEC))
-#endif
-   )
-)
-
-#endif
-
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* CONFIG_LOCK_STAT */
 
-#endif
+#endif /* CONFIG_LOCKDEP */
 
 #endif /* LTTNG_TRACE_LOCK_H */
 
diff --git a/probes/lttng-probe-lock.c b/probes/lttng-probe-lock.c
index b3ad230..e81eb36 100644
--- a/probes/lttng-probe-lock.c
+++ b/probes/lttng-probe-lock.c
@@ -16,12 +16,7 @@
  * Create the tracepoint static inlines from the kernel to validate that our
  * trace event macros match the kernel we run on.
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
 #include 
-#else
-#include 
-#endif
-
 #include 
 
 /*
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 21/30] Drop support for kernels < 3.0 from mm_vmscan instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/mm_vmscan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/instrumentation/events/lttng-module/mm_vmscan.h 
b/instrumentation/events/lttng-module/mm_vmscan.h
index b9cd8b0..cc7a275 100644
--- a/instrumentation/events/lttng-module/mm_vmscan.h
+++ b/instrumentation/events/lttng-module/mm_vmscan.h
@@ -640,7 +640,7 @@ LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
ctf_integer(int, reclaim_flags, trace_shrink_flags(file))
)
 )
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
+#else
 LTTNG_TRACEPOINT_EVENT(mm_vmscan_lru_shrink_inactive,
 
TP_PROTO(int nid, int zid,
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 18/30] Drop support for kernels < 3.0 from kmem instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/kmem.h | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/instrumentation/events/lttng-module/kmem.h 
b/instrumentation/events/lttng-module/kmem.h
index 8270fce..2313ae8 100644
--- a/instrumentation/events/lttng-module/kmem.h
+++ b/instrumentation/events/lttng-module/kmem.h
@@ -115,7 +115,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(kmem_free, kmem_cache_free,
TP_ARGS(call_site, ptr)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT_MAP(mm_page_free, kmem_mm_page_free,
 #else
@@ -218,11 +217,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(kmem_mm_page, 
mm_page_pcpu_drain,
 
kmem_mm_page_pcpu_drain,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,33))
TP_PROTO(struct page *page, unsigned int order, int migratetype),
-#else
-   TP_PROTO(struct page *page, int order, int migratetype),
-#endif
 
TP_ARGS(page, order, migratetype)
 )
@@ -337,8 +332,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(mm_page_alloc_extfrag,
 
 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0)) */
 
-#endif
-
 #endif /* LTTNG_TRACE_KMEM_H */
 
 /* This part must be outside protection */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 22/30] Drop support for kernels < 3.0 from module instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/module.h | 22 +---
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/instrumentation/events/lttng-module/module.h 
b/instrumentation/events/lttng-module/module.h
index febe8d2..89b1e79 100644
--- a/instrumentation/events/lttng-module/module.h
+++ b/instrumentation/events/lttng-module/module.h
@@ -54,24 +54,16 @@ LTTNG_TRACEPOINT_EVENT(module_free,
 
 LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
TP_PROTO(struct module *mod, unsigned long ip),
 
TP_ARGS(mod, ip),
-#else
-   TP_PROTO(struct module *mod, unsigned long ip, int refcnt),
-
-   TP_ARGS(mod, ip, refcnt),
-#endif
 
TP_FIELDS(
ctf_integer(unsigned long, ip, ip)
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0))
ctf_integer(int, refcnt, atomic_read(&mod->refcnt))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-   ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + 
__this_cpu_read(mod->refptr->decs))
 #else
-   ctf_integer(int, refcnt, refcnt)
+   ctf_integer(int, refcnt, __this_cpu_read(mod->refptr->incs) + 
__this_cpu_read(mod->refptr->decs))
 #endif
ctf_string(name, mod->name)
)
@@ -79,28 +71,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(module_refcnt,
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_get,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
TP_PROTO(struct module *mod, unsigned long ip),
 
TP_ARGS(mod, ip)
-#else
-   TP_PROTO(struct module *mod, unsigned long ip, int refcnt),
-
-   TP_ARGS(mod, ip, refcnt)
-#endif
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(module_refcnt, module_put,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
TP_PROTO(struct module *mod, unsigned long ip),
 
TP_ARGS(mod, ip)
-#else
-   TP_PROTO(struct module *mod, unsigned long ip, int refcnt),
-
-   TP_ARGS(mod, ip, refcnt)
-#endif
 )
 #endif /* CONFIG_MODULE_UNLOAD */
 
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 24/30] Drop support for kernels < 3.0 from power instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/power.h | 40 -
 1 file changed, 40 deletions(-)

diff --git a/instrumentation/events/lttng-module/power.h 
b/instrumentation/events/lttng-module/power.h
index 2146a37..fee6f5f 100644
--- a/instrumentation/events/lttng-module/power.h
+++ b/instrumentation/events/lttng-module/power.h
@@ -9,7 +9,6 @@
 #include 
 #include 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
 LTTNG_TRACEPOINT_EVENT_CLASS(power_cpu,
 
TP_PROTO(unsigned int state, unsigned int cpu_id),
@@ -59,7 +58,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(machine_suspend,
ctf_integer(u32, state, state)
)
 )
-#endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(power_wakeup_source,
@@ -93,12 +91,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(power_wakeup_source, 
wakeup_source_deactivat
 )
 #endif
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,38))
-#undef CONFIG_EVENT_POWER_TRACING_DEPRECATED
-#define CONFIG_EVENT_POWER_TRACING_DEPRECATED
-#define _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED
-#endif
-
 #ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED
 
 /*
@@ -107,69 +99,39 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE_MAP(power_wakeup_source, 
wakeup_source_deactivat
  */
 LTTNG_TRACEPOINT_EVENT_CLASS(power,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
 
TP_ARGS(type, state, cpu_id),
-#else
-   TP_PROTO(unsigned int type, unsigned int state),
-
-   TP_ARGS(type, state),
-#endif
 
TP_FIELDS(
ctf_integer(u64, type, type)
ctf_integer(u64, state, state)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
ctf_integer(u64, cpu_id, cpu_id)
-#endif
)
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(power, power_start,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
 
TP_ARGS(type, state, cpu_id)
-#else
-   TP_PROTO(unsigned int type, unsigned int state),
-
-   TP_ARGS(type, state)
-#endif
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(power, power_frequency,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id),
 
TP_ARGS(type, state, cpu_id)
-#else
-   TP_PROTO(unsigned int type, unsigned int state),
-
-   TP_ARGS(type, state)
-#endif
 )
 
 LTTNG_TRACEPOINT_EVENT(power_end,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
TP_PROTO(unsigned int cpu_id),
 
TP_ARGS(cpu_id),
-#else
-   TP_PROTO(int dummy),
-
-   TP_ARGS(dummy),
-#endif
 
TP_FIELDS(
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
ctf_integer(u64, cpu_id, cpu_id)
-#else
-   ctf_integer(u64, dummy, 0x)
-#endif
)
 )
 
@@ -207,7 +169,6 @@ static inline void trace_power_frequency(u64 type, u64 
state, u64 cpuid) {};
 
 #endif /* CONFIG_EVENT_POWER_TRACING_DEPRECATED */
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 /*
  * The clock events are used for clock enable/disable and for
  *  clock rate change
@@ -274,7 +235,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(power_domain, 
power_domain_target,
 
TP_ARGS(name, state, cpu_id)
 )
-#endif
 
 #endif /* LTTNG_TRACE_POWER_H */
 
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 23/30] Drop support for kernels < 3.0 from net instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/net.h | 12 
 1 file changed, 12 deletions(-)

diff --git a/instrumentation/events/lttng-module/net.h 
b/instrumentation/events/lttng-module/net.h
index 8789263..bfa14fc 100644
--- a/instrumentation/events/lttng-module/net.h
+++ b/instrumentation/events/lttng-module/net.h
@@ -439,30 +439,18 @@ LTTNG_TRACEPOINT_ENUM(net_network_header,
 
 LTTNG_TRACEPOINT_EVENT(net_dev_xmit,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
TP_PROTO(struct sk_buff *skb,
 int rc,
 struct net_device *dev,
 unsigned int skb_len),
 
TP_ARGS(skb, rc, dev, skb_len),
-#else
-   TP_PROTO(struct sk_buff *skb,
-int rc),
-
-   TP_ARGS(skb, rc),
-#endif
 
TP_FIELDS(
ctf_integer_hex(void *, skbaddr, skb)
ctf_integer(int, rc, rc)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,40))
ctf_integer(unsigned int, len, skb_len)
ctf_string(name, dev->name)
-#else
-   ctf_integer(unsigned int, len, skb->len)
-   ctf_string(name, skb->dev->name)
-#endif
)
 )
 
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 25/30] Drop support for kernels < 3.0 from sched instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/sched.h | 68 +++--
 1 file changed, 7 insertions(+), 61 deletions(-)

diff --git a/instrumentation/events/lttng-module/sched.h 
b/instrumentation/events/lttng-module/sched.h
index 550ce2f..77d77b2 100644
--- a/instrumentation/events/lttng-module/sched.h
+++ b/instrumentation/events/lttng-module/sched.h
@@ -93,7 +93,7 @@ static inline long __trace_sched_switch_state(struct 
task_struct *p)
return state;
 }
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#else
 
 static inline long __trace_sched_switch_state(struct task_struct *p)
 {
@@ -170,24 +170,16 @@ LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
 #else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
 LTTNG_TRACEPOINT_EVENT_CLASS(sched_wakeup_template,
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
TP_PROTO(struct task_struct *p, int success),
 
TP_ARGS(p, success),
-#else
-   TP_PROTO(struct rq *rq, struct task_struct *p, int success),
-
-   TP_ARGS(rq, p, success),
-#endif
 
TP_FIELDS(
ctf_array_text(char, comm, p->comm, TASK_COMM_LEN)
ctf_integer(pid_t, tid, p->pid)
ctf_integer(int, prio, p->prio - MAX_RT_PRIO)
ctf_integer(int, success, success)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
ctf_integer(int, target_cpu, task_cpu(p))
-#endif
)
 )
 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
@@ -224,7 +216,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, 
sched_wakeup_new,
 TP_PROTO(struct task_struct *p),
 TP_ARGS(p))
 
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#else
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup,
 TP_PROTO(struct task_struct *p, int success),
@@ -237,20 +229,7 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, 
sched_wakeup_new,
 TP_PROTO(struct task_struct *p, int success),
 TP_ARGS(p, success))
 
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup,
-TP_PROTO(struct rq *rq, struct task_struct *p, int success),
-TP_ARGS(rq, p, success))
-
-/*
- * Tracepoint for waking up a new task:
- */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_wakeup_template, sched_wakeup_new,
-TP_PROTO(struct rq *rq, struct task_struct *p, int success),
-TP_ARGS(rq, p, success))
-
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
 
 /*
  * Tracepoint for task switches, performed by the scheduler:
@@ -263,17 +242,12 @@ LTTNG_TRACEPOINT_EVENT(sched_switch,
 struct task_struct *next),
 
TP_ARGS(preempt, prev, next),
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
+#else
TP_PROTO(struct task_struct *prev,
 struct task_struct *next),
 
TP_ARGS(prev, next),
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
-   TP_PROTO(struct rq *rq, struct task_struct *prev,
-struct task_struct *next),
-
-   TP_ARGS(rq, prev, next),
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
+#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0)) */
 
TP_FIELDS(
ctf_array_text(char, prev_comm, prev->comm, TASK_COMM_LEN)
@@ -281,10 +255,8 @@ LTTNG_TRACEPOINT_EVENT(sched_switch,
ctf_integer(int, prev_prio, prev->prio - MAX_RT_PRIO)
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,4,0))
ctf_integer(long, prev_state, 
__trace_sched_switch_state(preempt, prev))
-#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
-   ctf_integer(long, prev_state, __trace_sched_switch_state(prev))
 #else
-   ctf_integer(long, prev_state, prev->state)
+   ctf_integer(long, prev_state, __trace_sched_switch_state(prev))
 #endif
ctf_array_text(char, next_comm, next->comm, TASK_COMM_LEN)
ctf_integer(pid_t, next_tid, next->pid)
@@ -341,15 +313,9 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template, 
sched_process_exit,
 /*
  * Tracepoint for waiting on task to unschedule:
  */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template, sched_wait_task,
TP_PROTO(struct task_struct *p),
TP_ARGS(p))
-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
-LTTNG_TRACEPOINT_EVENT_INSTANCE(sched_process_template, sched_wait_task,
-   TP_PROTO(struct rq *rq, struct task_struct *p),
-   TP_ARGS(rq, p))
-#endif /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35)) */
 
 /*
  * Tracepoint for a waiting task:
@@ -445,24 +411,6 @@ LTTNG_TRACEPOINT_EVENT_CODE(sched_process_fork,
TP_code_post()
 )
 
-#if (LINUX_VERSION_CO

[lttng-dev] [RFC PATCH lttng-modules v2 26/30] Drop support for kernels < 3.0 from scsi instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/scsi.h | 8 
 1 file changed, 8 deletions(-)

diff --git a/instrumentation/events/lttng-module/scsi.h 
b/instrumentation/events/lttng-module/scsi.h
index 97ee050..7882def 100644
--- a/instrumentation/events/lttng-module/scsi.h
+++ b/instrumentation/events/lttng-module/scsi.h
@@ -388,7 +388,6 @@
scsi_statusbyte_name(SAM_STAT_ACA_ACTIVE),  \
scsi_statusbyte_name(SAM_STAT_TASK_ABORTED))
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
 #define scsi_prot_op_name(result)  { result, #result }
 #define show_prot_op_name(val) \
__print_symbolic(val,   \
@@ -399,7 +398,6 @@
scsi_prot_op_name(SCSI_PROT_WRITE_INSERT),  \
scsi_prot_op_name(SCSI_PROT_READ_PASS), \
scsi_prot_op_name(SCSI_PROT_WRITE_PASS))
-#endif
 
 const char *scsi_trace_parse_cdb(struct trace_seq*, unsigned char*, int);
 #define __parse_cdb(cdb, len) scsi_trace_parse_cdb(p, cdb, len)
@@ -420,9 +418,7 @@ LTTNG_TRACEPOINT_EVENT(scsi_dispatch_cmd_start,
ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
-#endif
ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, 
cmd->cmd_len)
)
 )
@@ -443,9 +439,7 @@ LTTNG_TRACEPOINT_EVENT(scsi_dispatch_cmd_error,
ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
-#endif
ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, 
cmd->cmd_len)
)
 )
@@ -466,9 +460,7 @@ LTTNG_TRACEPOINT_EVENT_CLASS(scsi_cmd_done_timeout_template,
ctf_integer(unsigned int, cmd_len, cmd->cmd_len)
ctf_integer(unsigned int, data_sglen, scsi_sg_count(cmd))
ctf_integer(unsigned int, prot_sglen, scsi_prot_sg_count(cmd))
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39))
ctf_integer(unsigned char, prot_op, scsi_get_prot_op(cmd))
-#endif
ctf_sequence_hex(unsigned char, cmnd, cmd->cmnd, u32, 
cmd->cmd_len)
)
 )
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 29/30] Drop support for kernels < 3.0 from writeback instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/writeback.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/instrumentation/events/lttng-module/writeback.h 
b/instrumentation/events/lttng-module/writeback.h
index 3327a0f..feef945 100644
--- a/instrumentation/events/lttng-module/writeback.h
+++ b/instrumentation/events/lttng-module/writeback.h
@@ -308,9 +308,7 @@ DEFINE_WRITEBACK_EVENT(writeback_bdi_register)
 #endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,3,0)) */
 
 DEFINE_WRITEBACK_EVENT(writeback_nowork)
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38))
 DEFINE_WRITEBACK_EVENT(writeback_wake_background)
-#endif
 DEFINE_WRITEBACK_EVENT(writeback_wake_thread)
 DEFINE_WRITEBACK_EVENT(writeback_wake_forker_thread)
 DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister)
@@ -661,7 +659,6 @@ LTTNG_TRACEPOINT_EVENT(writeback_sb_inodes_requeue,
 )
 #endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_congest_waited_template,
 
TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
@@ -687,7 +684,6 @@ 
LTTNG_TRACEPOINT_EVENT_INSTANCE(writeback_congest_waited_template, writeback_wai
 
TP_ARGS(usec_timeout, usec_delayed)
 )
-#endif
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(writeback_single_inode_template,
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 28/30] Drop support for kernels < 3.0 from workqueue instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 .../events/lttng-module/workqueue.h   | 61 ---
 1 file changed, 61 deletions(-)

diff --git a/instrumentation/events/lttng-module/workqueue.h 
b/instrumentation/events/lttng-module/workqueue.h
index 07d6a53..e0ef917 100644
--- a/instrumentation/events/lttng-module/workqueue.h
+++ b/instrumentation/events/lttng-module/workqueue.h
@@ -9,8 +9,6 @@
 #include 
 #include 
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36))
-
 #ifndef _TRACE_WORKQUEUE_DEF_
 #define _TRACE_WORKQUEUE_DEF_
 
@@ -30,7 +28,6 @@ LTTNG_TRACEPOINT_EVENT_CLASS(workqueue_work,
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 /**
  * workqueue_queue_work - called when a work gets queued
  * @req_cpu:   the requested cpu
@@ -76,7 +73,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue_work, 
workqueue_activate_work,
 
TP_ARGS(work)
 )
-#endif
 
 /**
  * workqueue_execute_start - called immediately before the workqueue callback
@@ -109,63 +105,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue_work, 
workqueue_execute_end,
TP_ARGS(work)
 )
 
-#else
-
-LTTNG_TRACEPOINT_EVENT_CLASS(workqueue,
-
-   TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
-
-   TP_ARGS(wq_thread, work),
-
-   TP_FIELDS(
-   ctf_array(char, thread_comm, wq_thread->comm, TASK_COMM_LEN)
-   ctf_integer(pid_t, thread_pid, wq_thread->pid)
-   ctf_integer_hex(work_func_t, func, work->func)
-   )
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue, workqueue_insertion,
-
-   TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
-
-   TP_ARGS(wq_thread, work)
-)
-
-LTTNG_TRACEPOINT_EVENT_INSTANCE(workqueue, workqueue_execution,
-
-   TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
-
-   TP_ARGS(wq_thread, work)
-)
-
-/* Trace the creation of one workqueue thread on a cpu */
-LTTNG_TRACEPOINT_EVENT(workqueue_creation,
-
-   TP_PROTO(struct task_struct *wq_thread, int cpu),
-
-   TP_ARGS(wq_thread, cpu),
-
-   TP_FIELDS(
-   ctf_array(char, thread_comm, wq_thread->comm, TASK_COMM_LEN)
-   ctf_integer(pid_t, thread_pid, wq_thread->pid)
-   ctf_integer(int, cpu, cpu)
-   )
-)
-
-LTTNG_TRACEPOINT_EVENT(workqueue_destruction,
-
-   TP_PROTO(struct task_struct *wq_thread),
-
-   TP_ARGS(wq_thread),
-
-   TP_FIELDS(
-   ctf_array(char, thread_comm, wq_thread->comm, TASK_COMM_LEN)
-   ctf_integer(pid_t, thread_pid, wq_thread->pid)
-   )
-)
-
-#endif
-
 #endif /*  LTTNG_TRACE_WORKQUEUE_H */
 
 /* This part must be outside protection */
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 27/30] Drop support for kernels < 3.0 from skb instrumentation

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 instrumentation/events/lttng-module/skb.h | 4 
 1 file changed, 4 deletions(-)

diff --git a/instrumentation/events/lttng-module/skb.h 
b/instrumentation/events/lttng-module/skb.h
index 6d3fd45..1726b44 100644
--- a/instrumentation/events/lttng-module/skb.h
+++ b/instrumentation/events/lttng-module/skb.h
@@ -28,7 +28,6 @@ LTTNG_TRACEPOINT_EVENT_MAP(kfree_skb,
)
 )
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
 LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
 
skb_consume,
@@ -41,9 +40,7 @@ LTTNG_TRACEPOINT_EVENT_MAP(consume_skb,
ctf_integer_hex(void *, skbaddr, skb)
)
 )
-#endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,32))
 LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
 
TP_PROTO(const struct sk_buff *skb, int len),
@@ -55,7 +52,6 @@ LTTNG_TRACEPOINT_EVENT(skb_copy_datagram_iovec,
ctf_integer(int, len, len)
)
 )
-#endif
 
 #endif /* LTTNG_TRACE_SKB_H */
 
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [RFC PATCH lttng-modules v2 30/30] Drop support for kernels < 3.0 from Makefiles

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 Makefile  |  5 +---
 probes/Kbuild | 73 +--
 2 files changed, 19 insertions(+), 59 deletions(-)

diff --git a/Makefile b/Makefile
index ae2b195..c7b8a41 100644
--- a/Makefile
+++ b/Makefile
@@ -66,10 +66,7 @@ ifneq ($(KERNELRELEASE),)
   endif # CONFIG_HAVE_SYSCALL_TRACEPOINTS
 
   ifneq ($(CONFIG_PERF_EVENTS),)
-lttng-tracer-objs += $(shell \
-  if [ $(VERSION) -ge 3 \
--o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 33 \) 
] ; then \
-echo "lttng-context-perf-counters.o" ; fi;)
+lttng-tracer-objs += lttng-context-perf-counters.o
   endif # CONFIG_PERF_EVENTS
 
   ifneq ($(CONFIG_PREEMPT_RT_FULL),)
diff --git a/probes/Kbuild b/probes/Kbuild
index 0b1e016..b43dd49 100644
--- a/probes/Kbuild
+++ b/probes/Kbuild
@@ -35,14 +35,8 @@ ifneq ($(CONFIG_KVM),)
   ifneq ($(wildcard $(kvm_dep)),)
 CFLAGS_lttng-probe-kvm-x86.o += -I$(srctree)/virt/kvm
 CFLAGS_lttng-probe-kvm-x86-mmu.o += -I$(srctree)/virt/kvm
-obj-$(CONFIG_LTTNG) +=  $(shell \
-  if [ $(VERSION) -ge 3 \
--o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 
38 \) ] ; then \
-echo "lttng-probe-kvm-x86.o" ; fi;)
-obj-$(CONFIG_LTTNG) +=  $(shell \
-  if [ $(VERSION) -ge 3 \
--o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 
38 \) ] ; then \
-echo "lttng-probe-kvm-x86-mmu.o" ; fi;)
+obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86.o
+obj-$(CONFIG_LTTNG) += lttng-probe-kvm-x86-mmu.o
   else
 $(warning File $(kvm_dep) not found. Probe "kvm" x86-specific is 
disabled. Use full kernel source tree to enable it.)
   endif # $(wildcard $(kvm_dep))
@@ -66,10 +60,7 @@ ifneq ($(CONFIG_X86),)
   endif # $(wildcard $(x86_exceptions_dep))
 endif # CONFIG_X86
 
-obj-$(CONFIG_LTTNG) +=  $(shell \
-  if [ $(VERSION) -ge 3 \
--o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 33 \) ] ; 
then \
-echo "lttng-probe-signal.o" ; fi;)
+obj-$(CONFIG_LTTNG) += lttng-probe-signal.o
 
 ifneq ($(CONFIG_BLOCK),)
   # need blk_cmd_buf_len
@@ -81,10 +72,7 @@ endif # CONFIG_BLOCK
 ifneq ($(CONFIG_NET),)
   obj-$(CONFIG_LTTNG) += lttng-probe-napi.o
   obj-$(CONFIG_LTTNG) += lttng-probe-skb.o
-  obj-$(CONFIG_LTTNG) +=  $(shell \
-if [ $(VERSION) -ge 3 \
-  -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 37 \) ] 
; then \
-  echo "lttng-probe-net.o" ; fi;)
+  obj-$(CONFIG_LTTNG) += lttng-probe-net.o
   obj-$(CONFIG_LTTNG) +=  $(shell \
 if [ $(VERSION) -ge 4 \
   -o \( $(VERSION) -eq 3 -a $(PATCHLEVEL) -ge 1 \) ] ; then \
@@ -96,10 +84,7 @@ ifneq ($(CONFIG_NET),)
 endif # CONFIG_NET
 
 ifneq ($(CONFIG_SND_SOC),)
-  obj-$(CONFIG_LTTNG) +=  $(shell \
-if [ $(VERSION) -ge 3 \
-  -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 38 \) ] 
; then \
-  echo "lttng-probe-asoc.o" ; fi;)
+  obj-$(CONFIG_LTTNG) += lttng-probe-asoc.o
 endif # CONFIG_SND_SOC
 
 ifneq ($(CONFIG_EXT3_FS),)
@@ -141,23 +126,14 @@ ifneq ($(CONFIG_JBD),)
 endif # CONFIG_JBD
 
 ifneq ($(CONFIG_REGULATOR),)
-  obj-$(CONFIG_LTTNG) +=  $(shell \
-if [ $(VERSION) -ge 3 \
-  -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 38 \) ] 
; then \
-  echo "lttng-probe-regulator.o" ; fi;)
+  obj-$(CONFIG_LTTNG) += lttng-probe-regulator.o
 endif # CONFIG_REGULATOR
 
 ifneq ($(CONFIG_SCSI),)
-  obj-$(CONFIG_LTTNG) +=  $(shell \
-if [ $(VERSION) -ge 3 \
-  -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 35 \) ] 
; then \
-  echo "lttng-probe-scsi.o" ; fi;)
+  obj-$(CONFIG_LTTNG) += lttng-probe-scsi.o
 endif # CONFIG_SCSI
 
-obj-$(CONFIG_LTTNG) += $(shell \
-  if [ $(VERSION) -ge 3 \
--o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 36 \) ] ; 
then \
-echo "lttng-probe-vmscan.o" ; fi;)
+obj-$(CONFIG_LTTNG) += lttng-probe-vmscan.o
 
 # lock probe does not work, so disabling it for now
 #ifneq ($(CONFIG_LOCKDEP),)
@@ -166,32 +142,22 @@ obj-$(CONFIG_LTTNG) += $(shell \
 
 ifneq ($(CONFIG_BTRFS_FS),)
   btrfs_dep = $(srctree)/fs/btrfs/*.h
-  btrfs = $(shell \
-if [ $(VERSION) -ge 3 \
-  -o \( $(VERSION) -eq 2 -a $(PATCHLEVEL) -eq 6 -a $(SUBLEVEL) -ge 39 \) ] 
; then \
-  echo "lttng-probe-btrfs.o" ; fi;)
-  ifneq ($(btrfs),)
-ifeq ($(wildcard $(btrfs_dep)),)
-  $(warning Files $(btrfs_dep) not found. Probe "btrfs" is disabled. Use 
full kernel source tree to enable it.)
-  btrfs =
-endif # $(wildcard $(btrfs_dep))
-  endif # $(btrfs)
-  obj-$(CONFIG_LTTNG) += $(btrfs)
+  ifneq ($(wildcard $(btrfs_dep)),)
+obj-$(CONFIG_LTTNG) += lttng-probe-btrfs.o
+  else
+$(warning Files $(btrfs_dep) not found. Probe "btrfs" is disabled. Use 
full kernel source tree to enable it.)
+  endif # $(wildcard $(btrfs_dep))
 endif # CONFIG_BTRFS_FS
 
-obj-$(CONFIG_LTTNG) +=  $(shell \
-  

Re: [lttng-dev] [RFC PATCH lttng-modules v2 01/30] Bump minimum kernel version to 3.0

2018-11-08 Thread Michael Jeanson
On 2018-11-08 4:45 p.m., Michael Jeanson wrote:
> Upstream Linux 3.0 was released 7 years ago, the oldest longterm release
> still supported is 3.16. On the distro kernels side, we still cover :
> 
>  RHEL / CentOS 7 and up
>  SLES11 SP2 and up
>  SLES12 and up
>  Ubuntu 12.04 (Precise) and up
>  Debian 7 (Wheezy) and up
>  Fedora 16 and up
> 
> Signed-off-by: Michael Jeanson 

This patchset was compile tested on :

16:42:48 #538 (v4.7.10) completed with status SUCCESS
16:42:48 #543 (v4.1.52) completed with status SUCCESS
16:42:48 #531 (v4.14.79) completed with status SUCCESS
16:42:48 #533 (v4.12.14) completed with status SUCCESS
16:42:48 #537 (v4.8.17) completed with status SUCCESS
16:42:48 #528 (v4.17.19) completed with status SUCCESS
16:42:48 #535 (v4.10.17) completed with status SUCCESS
16:42:48 #539 (v4.6.7) completed with status SUCCESS
16:42:48 #544 (v4.2.8) completed with status SUCCESS
16:42:48 #534 (v4.11.12) completed with status SUCCESS
16:42:48 #525 (v4.20-rc1) completed with status SUCCESS
16:42:48 #526 (v4.19.1) completed with status SUCCESS
16:42:48 #542 (v4.3.6) completed with status SUCCESS
16:42:48 #532 (v4.13.16) completed with status SUCCESS
16:42:48 #545 (v4.0.9) completed with status SUCCESS
16:42:48 #546 (v3.19.8) completed with status SUCCESS
16:42:48 #540 (v4.5.7) completed with status SUCCESS
16:42:48 #536 (v4.9.135) completed with status SUCCESS
16:42:48 #541 (v4.4.162) completed with status SUCCESS
16:42:48 #530 (v4.15.18) completed with status SUCCESS
16:42:48 #529 (v4.16.18) completed with status SUCCESS
16:42:48 #550 (v3.15.10) completed with status SUCCESS
16:42:48 #527 (v4.18.17) completed with status SUCCESS
16:42:48 #551 (v3.14.79) completed with status SUCCESS
16:42:48 #552 (v3.13.11) completed with status SUCCESS
16:42:48 #547 (v3.18.124) completed with status SUCCESS
16:42:48 #548 (v3.17.8) completed with status SUCCESS
16:42:48 #549 (v3.16.60) completed with status SUCCESS
16:42:48 #553 (v3.12.74) completed with status SUCCESS
16:42:48 #555 (v3.10.108) completed with status SUCCESS
16:42:48 #554 (v3.11.10) completed with status SUCCESS
16:42:48 #556 (v3.9.11) completed with status SUCCESS
16:42:48 #560 (v3.5.7) completed with status SUCCESS
16:42:48 #559 (v3.6.11) completed with status SUCCESS
16:42:48 #563 (v3.2.102) completed with status SUCCESS
16:42:48 #557 (v3.8.13) completed with status SUCCESS
16:42:48 #558 (v3.7.10) completed with status SUCCESS
16:42:48 #561 (v3.4.113) completed with status SUCCESS
16:42:48 #564 (v3.1.10) completed with status SUCCESS
16:42:48 #562 (v3.3.8) completed with status SUCCESS
16:42:48 #565 (v3.0.101) completed with status SUCCESS
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [RFC PATCH lttng-modules v2 01/30] Bump minimum kernel version to 3.0

2018-11-08 Thread Mathieu Desnoyers


- On Nov 8, 2018, at 4:59 PM, Michael Jeanson mjean...@efficios.com wrote:

> On 2018-11-08 4:45 p.m., Michael Jeanson wrote:
>> Upstream Linux 3.0 was released 7 years ago, the oldest longterm release
>> still supported is 3.16. On the distro kernels side, we still cover :
>> 
>>  RHEL / CentOS 7 and up
>>  SLES11 SP2 and up
>>  SLES12 and up
>>  Ubuntu 12.04 (Precise) and up
>>  Debian 7 (Wheezy) and up
>>  Fedora 16 and up
>> 
>> Signed-off-by: Michael Jeanson 

Great patchset! Can I get a pointer to a git branch containing
this series I could pull from ?

Thanks,

Mathieu

> 
> This patchset was compile tested on :
> 
> 16:42:48 #538 (v4.7.10) completed with status SUCCESS
> 16:42:48 #543 (v4.1.52) completed with status SUCCESS
> 16:42:48 #531 (v4.14.79) completed with status SUCCESS
> 16:42:48 #533 (v4.12.14) completed with status SUCCESS
> 16:42:48 #537 (v4.8.17) completed with status SUCCESS
> 16:42:48 #528 (v4.17.19) completed with status SUCCESS
> 16:42:48 #535 (v4.10.17) completed with status SUCCESS
> 16:42:48 #539 (v4.6.7) completed with status SUCCESS
> 16:42:48 #544 (v4.2.8) completed with status SUCCESS
> 16:42:48 #534 (v4.11.12) completed with status SUCCESS
> 16:42:48 #525 (v4.20-rc1) completed with status SUCCESS
> 16:42:48 #526 (v4.19.1) completed with status SUCCESS
> 16:42:48 #542 (v4.3.6) completed with status SUCCESS
> 16:42:48 #532 (v4.13.16) completed with status SUCCESS
> 16:42:48 #545 (v4.0.9) completed with status SUCCESS
> 16:42:48 #546 (v3.19.8) completed with status SUCCESS
> 16:42:48 #540 (v4.5.7) completed with status SUCCESS
> 16:42:48 #536 (v4.9.135) completed with status SUCCESS
> 16:42:48 #541 (v4.4.162) completed with status SUCCESS
> 16:42:48 #530 (v4.15.18) completed with status SUCCESS
> 16:42:48 #529 (v4.16.18) completed with status SUCCESS
> 16:42:48 #550 (v3.15.10) completed with status SUCCESS
> 16:42:48 #527 (v4.18.17) completed with status SUCCESS
> 16:42:48 #551 (v3.14.79) completed with status SUCCESS
> 16:42:48 #552 (v3.13.11) completed with status SUCCESS
> 16:42:48 #547 (v3.18.124) completed with status SUCCESS
> 16:42:48 #548 (v3.17.8) completed with status SUCCESS
> 16:42:48 #549 (v3.16.60) completed with status SUCCESS
> 16:42:48 #553 (v3.12.74) completed with status SUCCESS
> 16:42:48 #555 (v3.10.108) completed with status SUCCESS
> 16:42:48 #554 (v3.11.10) completed with status SUCCESS
> 16:42:48 #556 (v3.9.11) completed with status SUCCESS
> 16:42:48 #560 (v3.5.7) completed with status SUCCESS
> 16:42:48 #559 (v3.6.11) completed with status SUCCESS
> 16:42:48 #563 (v3.2.102) completed with status SUCCESS
> 16:42:48 #557 (v3.8.13) completed with status SUCCESS
> 16:42:48 #558 (v3.7.10) completed with status SUCCESS
> 16:42:48 #561 (v3.4.113) completed with status SUCCESS
> 16:42:48 #564 (v3.1.10) completed with status SUCCESS
> 16:42:48 #562 (v3.3.8) completed with status SUCCESS
> 16:42:48 #565 (v3.0.101) completed with status SUCCESS

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Jonathan Rajotte
The nanoseconds part of the timespec struct time_a is not always
bigger than time_b since it wrap around each seconds.

Use the absolute value of the nanosecond difference to perform
unsigned long operation.

Signed-off-by: Jonathan Rajotte 
---
 src/common/sessiond-comm/inet.c  | 2 +-
 src/common/sessiond-comm/inet6.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/sessiond-comm/inet.c b/src/common/sessiond-comm/inet.c
index e0b3e7a96..cb6f45357 100644
--- a/src/common/sessiond-comm/inet.c
+++ b/src/common/sessiond-comm/inet.c
@@ -124,7 +124,7 @@ unsigned long time_diff_ms(struct timespec *time_a,
unsigned long result_ms;
 
sec_diff = time_a->tv_sec - time_b->tv_sec;
-   nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
+   nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);
 
result_ms = sec_diff * MSEC_PER_SEC;
result_ms += nsec_diff / NSEC_PER_MSEC;
diff --git a/src/common/sessiond-comm/inet6.c b/src/common/sessiond-comm/inet6.c
index dfb5fc5d1..b73802d48 100644
--- a/src/common/sessiond-comm/inet6.c
+++ b/src/common/sessiond-comm/inet6.c
@@ -122,7 +122,7 @@ unsigned long time_diff_ms(struct timespec *time_a,
unsigned long result_ms;
 
sec_diff = time_a->tv_sec - time_b->tv_sec;
-   nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
+   nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);
 
result_ms = sec_diff * MSEC_PER_SEC;
result_ms += nsec_diff / NSEC_PER_MSEC;
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [RFC PATCH lttng-modules v2 01/30] Bump minimum kernel version to 3.0

2018-11-08 Thread Michael Jeanson
On 2018-11-08 5:05 p.m., Mathieu Desnoyers wrote:
> 
> - On Nov 8, 2018, at 4:59 PM, Michael Jeanson mjean...@efficios.com wrote:
> 
>> On 2018-11-08 4:45 p.m., Michael Jeanson wrote:
>>> Upstream Linux 3.0 was released 7 years ago, the oldest longterm release
>>> still supported is 3.16. On the distro kernels side, we still cover :
>>>
>>>  RHEL / CentOS 7 and up
>>>  SLES11 SP2 and up
>>>  SLES12 and up
>>>  Ubuntu 12.04 (Precise) and up
>>>  Debian 7 (Wheezy) and up
>>>  Fedora 16 and up
>>>
>>> Signed-off-by: Michael Jeanson 
> 
> Great patchset! Can I get a pointer to a git branch containing
> this series I could pull from ?
> 
> Thanks,
> 
> Mathieu

Here you go : https://github.com/mjeanson/lttng-modules/tree/kernel3.0
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [PATCH lttng-modules] Add missing SPDX license identifiers to uprobes

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 probes/lttng-uprobes.c | 3 ++-
 wrapper/uprobes.h  | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/probes/lttng-uprobes.c b/probes/lttng-uprobes.c
index bcdbbd8..76023fb 100644
--- a/probes/lttng-uprobes.c
+++ b/probes/lttng-uprobes.c
@@ -1,4 +1,5 @@
-/*
+/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+ *
  * probes/lttng-uprobes.c
  *
  * LTTng uprobes integration module.
diff --git a/wrapper/uprobes.h b/wrapper/uprobes.h
index e38a541..28da640 100644
--- a/wrapper/uprobes.h
+++ b/wrapper/uprobes.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1) */
 #ifndef _LTTNG_WRAPPER_UPROBES_H
 #define _LTTNG_WRAPPER_UPROBES_H
 
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Simon Marchi

On 2018-11-08 17:08, Jonathan Rajotte wrote:

The nanoseconds part of the timespec struct time_a is not always
bigger than time_b since it wrap around each seconds.

Use the absolute value of the nanosecond difference to perform
unsigned long operation.

Signed-off-by: Jonathan Rajotte 
---
 src/common/sessiond-comm/inet.c  | 2 +-
 src/common/sessiond-comm/inet6.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/sessiond-comm/inet.c 
b/src/common/sessiond-comm/inet.c

index e0b3e7a96..cb6f45357 100644
--- a/src/common/sessiond-comm/inet.c
+++ b/src/common/sessiond-comm/inet.c
@@ -124,7 +124,7 @@ unsigned long time_diff_ms(struct timespec *time_a,
unsigned long result_ms;

sec_diff = time_a->tv_sec - time_b->tv_sec;
-   nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
+   nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);

result_ms = sec_diff * MSEC_PER_SEC;
result_ms += nsec_diff / NSEC_PER_MSEC;
diff --git a/src/common/sessiond-comm/inet6.c 
b/src/common/sessiond-comm/inet6.c

index dfb5fc5d1..b73802d48 100644
--- a/src/common/sessiond-comm/inet6.c
+++ b/src/common/sessiond-comm/inet6.c
@@ -122,7 +122,7 @@ unsigned long time_diff_ms(struct timespec *time_a,
unsigned long result_ms;

sec_diff = time_a->tv_sec - time_b->tv_sec;
-   nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
+   nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);

result_ms = sec_diff * MSEC_PER_SEC;
result_ms += nsec_diff / NSEC_PER_MSEC;


That doesn't look right either.  With

time_a = 2.9 s
time_b = 3.1 s

it will result in

sec_diff = 1 s
nsec_diff = 0.8 s

Added, the result will be 1.8 seconds, when actually we expect 0.2 s.  
You probably have no choice but do the "borrowing" by hand, like we did 
when learning subtraction in elementary school :).  Maybe this deserves 
some unit tests, since it's apparently easy to get it wrong.


Simon
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Simon Marchi

On 2018-11-08 17:17, Simon Marchi wrote:

On 2018-11-08 17:08, Jonathan Rajotte wrote:

The nanoseconds part of the timespec struct time_a is not always
bigger than time_b since it wrap around each seconds.

Use the absolute value of the nanosecond difference to perform
unsigned long operation.

Signed-off-by: Jonathan Rajotte 
---
 src/common/sessiond-comm/inet.c  | 2 +-
 src/common/sessiond-comm/inet6.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/sessiond-comm/inet.c 
b/src/common/sessiond-comm/inet.c

index e0b3e7a96..cb6f45357 100644
--- a/src/common/sessiond-comm/inet.c
+++ b/src/common/sessiond-comm/inet.c
@@ -124,7 +124,7 @@ unsigned long time_diff_ms(struct timespec 
*time_a,

unsigned long result_ms;

sec_diff = time_a->tv_sec - time_b->tv_sec;
-   nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
+   nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);

result_ms = sec_diff * MSEC_PER_SEC;
result_ms += nsec_diff / NSEC_PER_MSEC;
diff --git a/src/common/sessiond-comm/inet6.c 
b/src/common/sessiond-comm/inet6.c

index dfb5fc5d1..b73802d48 100644
--- a/src/common/sessiond-comm/inet6.c
+++ b/src/common/sessiond-comm/inet6.c
@@ -122,7 +122,7 @@ unsigned long time_diff_ms(struct timespec 
*time_a,

unsigned long result_ms;

sec_diff = time_a->tv_sec - time_b->tv_sec;
-   nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
+   nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);

result_ms = sec_diff * MSEC_PER_SEC;
result_ms += nsec_diff / NSEC_PER_MSEC;


That doesn't look right either.  With

time_a = 2.9 s
time_b = 3.1 s

it will result in

sec_diff = 1 s
nsec_diff = 0.8 s

Added, the result will be 1.8 seconds, when actually we expect 0.2 s.
You probably have no choice but do the "borrowing" by hand, like we
did when learning subtraction in elementary school :).  Maybe this
deserves some unit tests, since it's apparently easy to get it wrong.


Actually, see here for an example:

https://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html

Simon
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-tools] Fix: nsec diff can be negative leading to expeditive connection timeout

2018-11-08 Thread Jonathan Rajotte-Julien
You are right...Might have been looking to long at logs all day.

Thanks for pointing it out.

Will send v2 shortly.

On Thu, Nov 08, 2018 at 05:26:39PM -0500, Simon Marchi wrote:
> On 2018-11-08 17:17, Simon Marchi wrote:
> > On 2018-11-08 17:08, Jonathan Rajotte wrote:
> > > The nanoseconds part of the timespec struct time_a is not always
> > > bigger than time_b since it wrap around each seconds.
> > > 
> > > Use the absolute value of the nanosecond difference to perform
> > > unsigned long operation.
> > > 
> > > Signed-off-by: Jonathan Rajotte 
> > > ---
> > >  src/common/sessiond-comm/inet.c  | 2 +-
> > >  src/common/sessiond-comm/inet6.c | 2 +-
> > >  2 files changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/src/common/sessiond-comm/inet.c
> > > b/src/common/sessiond-comm/inet.c
> > > index e0b3e7a96..cb6f45357 100644
> > > --- a/src/common/sessiond-comm/inet.c
> > > +++ b/src/common/sessiond-comm/inet.c
> > > @@ -124,7 +124,7 @@ unsigned long time_diff_ms(struct timespec
> > > *time_a,
> > >   unsigned long result_ms;
> > > 
> > >   sec_diff = time_a->tv_sec - time_b->tv_sec;
> > > - nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
> > > + nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);
> > > 
> > >   result_ms = sec_diff * MSEC_PER_SEC;
> > >   result_ms += nsec_diff / NSEC_PER_MSEC;
> > > diff --git a/src/common/sessiond-comm/inet6.c
> > > b/src/common/sessiond-comm/inet6.c
> > > index dfb5fc5d1..b73802d48 100644
> > > --- a/src/common/sessiond-comm/inet6.c
> > > +++ b/src/common/sessiond-comm/inet6.c
> > > @@ -122,7 +122,7 @@ unsigned long time_diff_ms(struct timespec
> > > *time_a,
> > >   unsigned long result_ms;
> > > 
> > >   sec_diff = time_a->tv_sec - time_b->tv_sec;
> > > - nsec_diff = time_a->tv_nsec - time_b->tv_nsec;
> > > + nsec_diff = labs(time_a->tv_nsec - time_b->tv_nsec);
> > > 
> > >   result_ms = sec_diff * MSEC_PER_SEC;
> > >   result_ms += nsec_diff / NSEC_PER_MSEC;
> > 
> > That doesn't look right either.  With
> > 
> > time_a = 2.9 s
> > time_b = 3.1 s
> > 
> > it will result in
> > 
> > sec_diff = 1 s
> > nsec_diff = 0.8 s
> > 
> > Added, the result will be 1.8 seconds, when actually we expect 0.2 s.
> > You probably have no choice but do the "borrowing" by hand, like we
> > did when learning subtraction in elementary school :).  Maybe this
> > deserves some unit tests, since it's apparently easy to get it wrong.
> 
> Actually, see here for an example:
> 
> https://www.gnu.org/software/libc/manual/html_node/Elapsed-Time.html
> 
> Simon

-- 
Jonathan Rajotte-Julien
EfficiOS
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] lost trace events

2018-11-08 Thread Alok Priyadarshi
Jonathan: The system is x86_64, 16 cores, no cpu affinity set. Not too sure
about load yet.

Mathieu: The explanation makes sense. Running babeltrace with
--stream-intersection flag did filter out a lot of events. However it is
hard to verify the filtered result because we do not yet know how to read
the text format. Does the babeltrace python API support stream intersection
by any chance?


On Thu, Nov 8, 2018 at 9:52 AM Mathieu Desnoyers <
mathieu.desnoy...@efficios.com> wrote:

> Hi Alok,
>
> With a snapshot trace, you can end up with some per-cpu buffers that
> contain information
> going further back in time compared to other per-cpu buffers. This depends
> on the level of
> system activity and tracing throughput for each CPU.
>
> The situation you experience can very well be triggered by having the
> begin event on one CPU,
> being migrated to another CPU, and having the end event on another CPU. If
> either the
> source or destination CPU has been more active than the other, you may
> find that you
> have only the begin or the end event in your trace.
>
> This is why we implemented the "stream intersection" mode in babeltrace.
> It ensures that
> babeltrace cuts away trace data belonging to time spans that only appear
> in some of
> the streams. It is not however activated by default.
>
> To try it out, you can do this:
>
> babeltrace --stream-intersection path/to/trace
>
> Does it help ?
>
> Thanks,
>
> Mathieu
>
> - On Nov 7, 2018, at 7:12 PM, Alok Priyadarshi 
> wrote:
>
> A custom trace event class emits "begin" and "end" events in its
> constructor and destructor respectively. So I do not think this is due to
> conditional path.
>
> Sequence of commands to capture a snapshot are:
> lttng create --snapshot
> lttng enable-event --userspace --all
> lttng add-context --userspace -t vpid -t vtid
> lttng start
> lttng stop
> lttng snapshot record
>
> We create a new session for each snapshot to make sure that the buffer
> does not have any left-over events from the previous session. But I am
> curious if lttng shares buffers between sessions or re-uses buffers from an
> old session without flushing?
>
> Note that I am using the default LTTNG_BUFFER_PER_UID mode. All processes
> for our application run under one UID, and only one tracing session is
> active at a time.
>
> On Wed, Nov 7, 2018 at 12:09 PM Jonathan Rajotte-Julien <
> jonathan.rajotte-jul...@efficios.com> wrote:
>
>> Hi Alok,
>>
>> On Wed, Nov 07, 2018 at 11:53:25AM -0800, Alok Priyadarshi wrote:
>> > Hi Jonathan,
>> >
>> > Thanks for your response.
>> >
>> > We are tracing function scopes. Each scope emits two events - begin and
>> > end. We noticed that some begin events did not have corresponding end
>> > events in the trace.
>>
>> Seems like a solid ground as long as the corresponding ending event is not
>> inside any conditional paths. I'm sure you already validated that but we
>> never
>> know.
>>
>> >
>> > I have the trace with this problem available. Would that provide any
>> clue?
>>
>> It could help but I presume it might contains confidential or sensible
>> information. Let's define the scenario first and we will go back to actual
>> trace data if needed.
>>
>> > If not, I will try to extract a small reproducer.
>>
>> That would be best. In the meantime, could you provide the exact lttng
>> commands
>> used to setup everything and describe subsequent lttng commands used for
>> snapshot etc.
>>
>> You can omit event name or replace them with dummy name if necessary.
>>
>> Cheers
>>
>> --
>> Jonathan Rajotte-Julien
>> EfficiOS
>>
>
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com
>
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


[lttng-dev] [PATCH lttng-modules v2] Add missing SPDX license identifiers to uprobes

2018-11-08 Thread Michael Jeanson
Signed-off-by: Michael Jeanson 
---
 probes/lttng-uprobes.c | 16 ++--
 wrapper/uprobes.h  | 22 +-
 2 files changed, 7 insertions(+), 31 deletions(-)

diff --git a/probes/lttng-uprobes.c b/probes/lttng-uprobes.c
index bcdbbd8..64d8237 100644
--- a/probes/lttng-uprobes.c
+++ b/probes/lttng-uprobes.c
@@ -1,4 +1,5 @@
-/*
+/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
+ *
  * probes/lttng-uprobes.c
  *
  * LTTng uprobes integration module.
@@ -6,19 +7,6 @@
  * Copyright (C) 2013 Yannick Brosseau 
  * Copyright (C) 2009-2012 Mathieu Desnoyers 
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #include 
diff --git a/wrapper/uprobes.h b/wrapper/uprobes.h
index e38a541..6ea9df1 100644
--- a/wrapper/uprobes.h
+++ b/wrapper/uprobes.h
@@ -1,7 +1,5 @@
-#ifndef _LTTNG_WRAPPER_UPROBES_H
-#define _LTTNG_WRAPPER_UPROBES_H
-
-/*
+/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
+ *
  * wrapper/uprobes.h
  *
  * wrapper around uprobes. Using KALLSYMS to get its address when
@@ -11,21 +9,11 @@
  * Copyright (C) 2013 Yannick Brosseau 
  * Copyright (C) 2017 Francis Deslauriers 
  *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; only
- * version 2.1 of the License.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#ifndef _LTTNG_WRAPPER_UPROBES_H
+#define _LTTNG_WRAPPER_UPROBES_H
+
 #include 
 
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
-- 
2.17.1

___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] lost trace events

2018-11-08 Thread Jérémie Galarneau
On Thu, 8 Nov 2018 at 18:31, Alok Priyadarshi  wrote:
>
> Jonathan: The system is x86_64, 16 cores, no cpu affinity set. Not too sure 
> about load yet.
>
> Mathieu: The explanation makes sense. Running babeltrace with 
> --stream-intersection flag did filter out a lot of events. However it is hard 
> to verify the filtered result because we do not yet know how to read the text 
> format. Does the babeltrace python API support stream intersection by any 
> chance?

Hi Alok,

The TraceCollection constructor accepts an "intersect_mode" parameter
which will provide the same semantics as --stream-intersection.

Regards,
Jérémie

>
>
> On Thu, Nov 8, 2018 at 9:52 AM Mathieu Desnoyers 
>  wrote:
>>
>> Hi Alok,
>>
>> With a snapshot trace, you can end up with some per-cpu buffers that contain 
>> information
>> going further back in time compared to other per-cpu buffers. This depends 
>> on the level of
>> system activity and tracing throughput for each CPU.
>>
>> The situation you experience can very well be triggered by having the begin 
>> event on one CPU,
>> being migrated to another CPU, and having the end event on another CPU. If 
>> either the
>> source or destination CPU has been more active than the other, you may find 
>> that you
>> have only the begin or the end event in your trace.
>>
>> This is why we implemented the "stream intersection" mode in babeltrace. It 
>> ensures that
>> babeltrace cuts away trace data belonging to time spans that only appear in 
>> some of
>> the streams. It is not however activated by default.
>>
>> To try it out, you can do this:
>>
>> babeltrace --stream-intersection path/to/trace
>>
>> Does it help ?
>>
>> Thanks,
>>
>> Mathieu
>>
>> - On Nov 7, 2018, at 7:12 PM, Alok Priyadarshi  wrote:
>>
>> A custom trace event class emits "begin" and "end" events in its constructor 
>> and destructor respectively. So I do not think this is due to conditional 
>> path.
>>
>> Sequence of commands to capture a snapshot are:
>> lttng create --snapshot
>> lttng enable-event --userspace --all
>> lttng add-context --userspace -t vpid -t vtid
>> lttng start
>> lttng stop
>> lttng snapshot record
>>
>> We create a new session for each snapshot to make sure that the buffer does 
>> not have any left-over events from the previous session. But I am curious if 
>> lttng shares buffers between sessions or re-uses buffers from an old session 
>> without flushing?
>>
>> Note that I am using the default LTTNG_BUFFER_PER_UID mode. All processes 
>> for our application run under one UID, and only one tracing session is 
>> active at a time.
>>
>> On Wed, Nov 7, 2018 at 12:09 PM Jonathan Rajotte-Julien 
>>  wrote:
>>>
>>> Hi Alok,
>>>
>>> On Wed, Nov 07, 2018 at 11:53:25AM -0800, Alok Priyadarshi wrote:
>>> > Hi Jonathan,
>>> >
>>> > Thanks for your response.
>>> >
>>> > We are tracing function scopes. Each scope emits two events - begin and
>>> > end. We noticed that some begin events did not have corresponding end
>>> > events in the trace.
>>>
>>> Seems like a solid ground as long as the corresponding ending event is not
>>> inside any conditional paths. I'm sure you already validated that but we 
>>> never
>>> know.
>>>
>>> >
>>> > I have the trace with this problem available. Would that provide any clue?
>>>
>>> It could help but I presume it might contains confidential or sensible
>>> information. Let's define the scenario first and we will go back to actual
>>> trace data if needed.
>>>
>>> > If not, I will try to extract a small reproducer.
>>>
>>> That would be best. In the meantime, could you provide the exact lttng 
>>> commands
>>> used to setup everything and describe subsequent lttng commands used for
>>> snapshot etc.
>>>
>>> You can omit event name or replace them with dummy name if necessary.
>>>
>>> Cheers
>>>
>>> --
>>> Jonathan Rajotte-Julien
>>> EfficiOS
>>
>>
>> ___
>> lttng-dev mailing list
>> lttng-dev@lists.lttng.org
>> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>>
>>
>> --
>> Mathieu Desnoyers
>> EfficiOS Inc.
>> http://www.efficios.com
>
> ___
> lttng-dev mailing list
> lttng-dev@lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev



-- 
Jérémie Galarneau
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [PATCH lttng-modules v2] Add missing SPDX license identifiers to uprobes

2018-11-08 Thread Mathieu Desnoyers
Merged, thanks!

Mathieu

- On Nov 8, 2018, at 6:37 PM, Michael Jeanson mjean...@efficios.com wrote:

> Signed-off-by: Michael Jeanson 
> ---
> probes/lttng-uprobes.c | 16 ++--
> wrapper/uprobes.h  | 22 +-
> 2 files changed, 7 insertions(+), 31 deletions(-)
> 
> diff --git a/probes/lttng-uprobes.c b/probes/lttng-uprobes.c
> index bcdbbd8..64d8237 100644
> --- a/probes/lttng-uprobes.c
> +++ b/probes/lttng-uprobes.c
> @@ -1,4 +1,5 @@
> -/*
> +/* SPDX-License-Identifier: (GPL-2.0 OR LGPL-2.1)
> + *
>  * probes/lttng-uprobes.c
>  *
>  * LTTng uprobes integration module.
> @@ -6,19 +7,6 @@
>  * Copyright (C) 2013 Yannick Brosseau 
>  * Copyright (C) 2009-2012 Mathieu Desnoyers 
>  *
> - * This library is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU Lesser General Public
> - * License as published by the Free Software Foundation; only
> - * version 2.1 of the License.
> - *
> - * This library is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * Lesser General Public License for more details.
> - *
> - * You should have received a copy of the GNU Lesser General Public
> - * License along with this library; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
>  */
> 
> #include 
> diff --git a/wrapper/uprobes.h b/wrapper/uprobes.h
> index e38a541..6ea9df1 100644
> --- a/wrapper/uprobes.h
> +++ b/wrapper/uprobes.h
> @@ -1,7 +1,5 @@
> -#ifndef _LTTNG_WRAPPER_UPROBES_H
> -#define _LTTNG_WRAPPER_UPROBES_H
> -
> -/*
> +/* SPDX-License-Identifier: (GPL-2.0 or LGPL-2.1)
> + *
>  * wrapper/uprobes.h
>  *
>  * wrapper around uprobes. Using KALLSYMS to get its address when
> @@ -11,21 +9,11 @@
>  * Copyright (C) 2013 Yannick Brosseau 
>  * Copyright (C) 2017 Francis Deslauriers 
>  *
> - * This library is free software; you can redistribute it and/or
> - * modify it under the terms of the GNU Lesser General Public
> - * License as published by the Free Software Foundation; only
> - * version 2.1 of the License.
> - *
> - * This library is distributed in the hope that it will be useful,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * Lesser General Public License for more details.
> - *
> - * You should have received a copy of the GNU Lesser General Public
> - * License along with this library; if not, write to the Free Software
> - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 
> USA
>  */
> 
> +#ifndef _LTTNG_WRAPPER_UPROBES_H
> +#define _LTTNG_WRAPPER_UPROBES_H
> +
> #include 
> 
> #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0))
> --
> 2.17.1

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] [RFC PATCH lttng-modules v2 01/30] Bump minimum kernel version to 3.0

2018-11-08 Thread Mathieu Desnoyers
Merged, thanks!

Mathieu

- On Nov 8, 2018, at 5:09 PM, Michael Jeanson mjean...@efficios.com wrote:

> On 2018-11-08 5:05 p.m., Mathieu Desnoyers wrote:
>> 
>> - On Nov 8, 2018, at 4:59 PM, Michael Jeanson mjean...@efficios.com 
>> wrote:
>> 
>>> On 2018-11-08 4:45 p.m., Michael Jeanson wrote:
 Upstream Linux 3.0 was released 7 years ago, the oldest longterm release
 still supported is 3.16. On the distro kernels side, we still cover :

  RHEL / CentOS 7 and up
  SLES11 SP2 and up
  SLES12 and up
  Ubuntu 12.04 (Precise) and up
  Debian 7 (Wheezy) and up
  Fedora 16 and up

 Signed-off-by: Michael Jeanson 
>> 
>> Great patchset! Can I get a pointer to a git branch containing
>> this series I could pull from ?
>> 
>> Thanks,
>> 
>> Mathieu
> 
> Here you go : https://github.com/mjeanson/lttng-modules/tree/kernel3.0

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev


Re: [lttng-dev] lost trace events

2018-11-08 Thread Alok Priyadarshi
Awesome, I tried the intersect_mode parameter and it worked. No more lost
events. Thanks for your support.

On Thu, Nov 8, 2018 at 3:44 PM Jérémie Galarneau <
jeremie.galarn...@efficios.com> wrote:

> On Thu, 8 Nov 2018 at 18:31, Alok Priyadarshi  wrote:
> >
> > Jonathan: The system is x86_64, 16 cores, no cpu affinity set. Not too
> sure about load yet.
> >
> > Mathieu: The explanation makes sense. Running babeltrace with
> --stream-intersection flag did filter out a lot of events. However it is
> hard to verify the filtered result because we do not yet know how to read
> the text format. Does the babeltrace python API support stream intersection
> by any chance?
>
> Hi Alok,
>
> The TraceCollection constructor accepts an "intersect_mode" parameter
> which will provide the same semantics as --stream-intersection.
>
> Regards,
> Jérémie
>
> >
> >
> > On Thu, Nov 8, 2018 at 9:52 AM Mathieu Desnoyers <
> mathieu.desnoy...@efficios.com> wrote:
> >>
> >> Hi Alok,
> >>
> >> With a snapshot trace, you can end up with some per-cpu buffers that
> contain information
> >> going further back in time compared to other per-cpu buffers. This
> depends on the level of
> >> system activity and tracing throughput for each CPU.
> >>
> >> The situation you experience can very well be triggered by having the
> begin event on one CPU,
> >> being migrated to another CPU, and having the end event on another CPU.
> If either the
> >> source or destination CPU has been more active than the other, you may
> find that you
> >> have only the begin or the end event in your trace.
> >>
> >> This is why we implemented the "stream intersection" mode in
> babeltrace. It ensures that
> >> babeltrace cuts away trace data belonging to time spans that only
> appear in some of
> >> the streams. It is not however activated by default.
> >>
> >> To try it out, you can do this:
> >>
> >> babeltrace --stream-intersection path/to/trace
> >>
> >> Does it help ?
> >>
> >> Thanks,
> >>
> >> Mathieu
> >>
> >> - On Nov 7, 2018, at 7:12 PM, Alok Priyadarshi 
> wrote:
> >>
> >> A custom trace event class emits "begin" and "end" events in its
> constructor and destructor respectively. So I do not think this is due to
> conditional path.
> >>
> >> Sequence of commands to capture a snapshot are:
> >> lttng create --snapshot
> >> lttng enable-event --userspace --all
> >> lttng add-context --userspace -t vpid -t vtid
> >> lttng start
> >> lttng stop
> >> lttng snapshot record
> >>
> >> We create a new session for each snapshot to make sure that the buffer
> does not have any left-over events from the previous session. But I am
> curious if lttng shares buffers between sessions or re-uses buffers from an
> old session without flushing?
> >>
> >> Note that I am using the default LTTNG_BUFFER_PER_UID mode. All
> processes for our application run under one UID, and only one tracing
> session is active at a time.
> >>
> >> On Wed, Nov 7, 2018 at 12:09 PM Jonathan Rajotte-Julien <
> jonathan.rajotte-jul...@efficios.com> wrote:
> >>>
> >>> Hi Alok,
> >>>
> >>> On Wed, Nov 07, 2018 at 11:53:25AM -0800, Alok Priyadarshi wrote:
> >>> > Hi Jonathan,
> >>> >
> >>> > Thanks for your response.
> >>> >
> >>> > We are tracing function scopes. Each scope emits two events - begin
> and
> >>> > end. We noticed that some begin events did not have corresponding end
> >>> > events in the trace.
> >>>
> >>> Seems like a solid ground as long as the corresponding ending event is
> not
> >>> inside any conditional paths. I'm sure you already validated that but
> we never
> >>> know.
> >>>
> >>> >
> >>> > I have the trace with this problem available. Would that provide any
> clue?
> >>>
> >>> It could help but I presume it might contains confidential or sensible
> >>> information. Let's define the scenario first and we will go back to
> actual
> >>> trace data if needed.
> >>>
> >>> > If not, I will try to extract a small reproducer.
> >>>
> >>> That would be best. In the meantime, could you provide the exact lttng
> commands
> >>> used to setup everything and describe subsequent lttng commands used
> for
> >>> snapshot etc.
> >>>
> >>> You can omit event name or replace them with dummy name if necessary.
> >>>
> >>> Cheers
> >>>
> >>> --
> >>> Jonathan Rajotte-Julien
> >>> EfficiOS
> >>
> >>
> >> ___
> >> lttng-dev mailing list
> >> lttng-dev@lists.lttng.org
> >> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
> >>
> >>
> >> --
> >> Mathieu Desnoyers
> >> EfficiOS Inc.
> >> http://www.efficios.com
> >
> > ___
> > lttng-dev mailing list
> > lttng-dev@lists.lttng.org
> > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
>
>
>
> --
> Jérémie Galarneau
> EfficiOS Inc.
> http://www.efficios.com
>
___
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev