[lttng-dev] [RELEASE] LTTng-modules 2.11.0-rc6, 2.10.11, 2.9.14 (Linux kernel tracer)

2019-09-07 Thread Mathieu Desnoyers
define when not building with gcc * Fix: lttng-tracepoint module notifier should return NOTIFY_OK -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman

[lttng-dev] [RELEASE] LTTng-UST v2.11.0-rc4, v2.10.5, v2.9.6 (Linux user-space tracer)

2019-09-07 Thread Mathieu Desnoyers
when not building with gcc * Fix: client_sequence_number may dereference NULL pointer * Fix: namespace our gettid wrapper -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com ___ lttng-dev mailing list lttng-dev@lists.lttng.org

[lttng-dev] [PATCH lttng-tools 1/1] Fix: sessiond: handle NULL control output in session descriptor base path getter

2019-09-05 Thread Mathieu Desnoyers
en setting the default output. When the default output is used, no base path override is possible, therefore it is fine to assign the base_path to NULL in the base path getter. Signed-off-by: Mathieu Desnoyers --- src/common/session-descriptor.c | 8 ++-- 1 file changed, 6 insertions(+), 2

Re: [lttng-dev] [PATCH lttng-tools] Fix: check validity of a stream before invoking ust flush command

2019-08-28 Thread Mathieu Desnoyers
the stream lock held. > The removal from the hash table also requires the stream > lock ensuring the validity of cds_lfht_is_node_deleted return value. This last sentence can therefore be removed (becomes redundant). With those commit message changes: Reviewed-by: Mathieu Desnoyers Th

Re: [lttng-dev] [PATCH lttng-modules] Make bitfield.h C++-friendly

2019-08-19 Thread Mathieu Desnoyers
= sizeof(type) * CHAR_BIT; /* type size */\ > -- > 2.23.0 > > _______ > 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.ef

Re: [lttng-dev] [PATCH lttng-ust] Make bitfield.h C++-friendly

2019-08-19 Thread Mathieu Desnoyers
\ > unsigned long _ts = sizeof(type) * CHAR_BIT; /* type size */\ > -- > 2.23.0 > > _______ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttn

Re: [lttng-dev] [PATCH lttng-modules 1/3] Introduce LTTNG_KERNEL_SESSION_SET_NAME

2019-08-13 Thread Mathieu Desnoyers
ow the tracer to > propagate the information inside the trace metadata under a "env" field. > > This information is normally inferred from the generated folder > structure where a trace rests. > > Reviewed-by: Mathieu Desnoyers > Signed-off-by: Jonathan Ra

Re: [lttng-dev] [PATCH lttng-tools v2 1/4] Save registration time for app

2019-08-13 Thread Mathieu Desnoyers
ck; > + /* > + * Time at which the app is registred. > + * Used for path creation > + */ > + time_t registration_time; > }; > > #ifdef HAVE_LIBLTTNG_UST_CTL > -- > 2.17.1 > > ___ > lttng-dev mailing list > lttng-dev@list

Re: [lttng-dev] [PATCH lttng-tools 1/3] Metadata: add env fields to ease lttng path hierarchy creation for viewer

2019-08-13 Thread Mathieu Desnoyers
,6 +69,37 @@ struct timespec timespec_abs_diff(struct timespec t1, > struct > timespec t2) > return res; > } > > +LTTNG_HIDDEN > +int time_t_to_ISO8601(char *dest, size_t dest_size, time_t time) > +{ > + int ret; > + struct tm tm, *timeinfo; > + > + if (dest_size < ISO8601_LEN) { > + ERR("Failed to format time to ISO8601 destination too small"); > + ret = -1; > + goto end; > + } > + > + timeinfo = localtime_r(&time, &tm); > + if (!timeinfo) { > + PERROR("localtime"); > + ret = -1; > + goto end; > + } > + > + ret = strftime(dest, dest_size, ISO8601_FORMAT, timeinfo); > + if (ret == 0) { > + ERR("Failed to format time to ISO8601"); > + ret = -1; > + goto end; > + } > + > + ret = 0; > +end: > + return ret; > +} > + > static > void __attribute__((constructor)) init_locale_utf8_support(void) > { > diff --git a/src/common/time.h b/src/common/time.h > index 24513d30b..5ea8c6628 100644 > --- a/src/common/time.h > +++ b/src/common/time.h > @@ -46,6 +46,9 @@ bool locale_supports_utf8(void); > #define MIN_UNIT"m" > #define HR_UNIT "h" > > +#define ISO8601_FORMAT "%Y%m%dT%H%M%S%z" > +#define ISO8601_LEN 26 > + > /* > * timespec_to_ms: Convert timespec to milliseconds. > * > @@ -61,4 +64,10 @@ int timespec_to_ms(struct timespec ts, unsigned long *ms); > LTTNG_HIDDEN > struct timespec timespec_abs_diff(struct timespec ts_a, struct timespec ts_b); > > +/* > + * Format time_t to ISO8601 compatible format. > + */ > +LTTNG_HIDDEN > +int time_t_to_ISO8601(char *s, size_t s_size, time_t time); > + > #endif /* LTTNG_TIME_H */ > -- > 2.17.1 > > ___ > 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-tools] pprint.m4: add missing copyright header

2019-08-08 Thread Mathieu Desnoyers
Add the missing copyright header to pprint.m4, clarifying that it is GPLv2+ with the special exception applying to Autoconf Macros. Signed-off-by: Mathieu Desnoyers CC: Philippe Proulx --- m4/pprint.m4 | 34 -- 1 file changed, 32 insertions(+), 2 deletions

Re: [lttng-dev] [PATCH v2 0/4] userspace-rcu: Add lock-free, ordered singly linked list

2019-07-30 Thread Mathieu Desnoyers
- On Jul 30, 2019, at 9:34 AM, Junchang Wang junchangw...@gmail.com wrote: > On Mon, Jul 29, 2019 at 9:55 PM Mathieu Desnoyers > wrote: >> >> - On Jul 29, 2019, at 9:35 AM, Junchang Wang junchangw...@gmail.com >> wrote: >> >> > Hi Mathieu and

Re: [lttng-dev] [PATCH lttng-ust v2] Fix: wait for initial statedump before proceeding to the main program

2019-07-30 Thread Mathieu Desnoyers
t; Fixes #1190 > > Signed-off-by: Gabriel-Andrew Pollo-Guilbert > > Signed-off-by: Mathieu Desnoyers > --- > v2: > * renamed constructor_sem_posted -> registration_done > * add sem_count_initial_value > * add assert in decrement_sem_count() >

Re: [lttng-dev] 回复:Re: 回复:Re: Pros and Cons of LTTng

2019-07-30 Thread Mathieu Desnoyers
s like CentOS 6 (with > kernel 2.6) but could not find it. And which kernel version is minimum > requirement for LTTng? > Regards > Hai > -- Original ---------- > From: "Mathieu Desnoyers"; > Date: Thu, Jul 25, 2019 11:48 PM > To: &quo

Re: [lttng-dev] [PATCH lttng-ust v2] Use MAP_POPULATE to reduce pagefault when available

2019-07-29 Thread Mathieu Desnoyers
- On Jul 29, 2019, at 2:57 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 29, 2019, at 2:55 PM, Mathieu Desnoyers > mathieu.desnoy...@efficios.com wrote: > >> - On Jul 29, 2019, at 2:49 PM, Jonathan Rajotte >> jonathan.rajotte-jul.

Re: [lttng-dev] [PATCH lttng-ust v2] Use MAP_POPULATE to reduce pagefault when available

2019-07-29 Thread Mathieu Desnoyers
- On Jul 29, 2019, at 2:55 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > - On Jul 29, 2019, at 2:49 PM, Jonathan Rajotte > jonathan.rajotte-jul...@efficios.com wrote: > >> Any ring buffer configuration bigger than PAGE_SIZE would result >> in an

Re: [lttng-dev] [PATCH lttng-ust v2] Use MAP_POPULATE to reduce pagefault when available

2019-07-29 Thread Mathieu Desnoyers
ap: mmap */ > memory_map = mmap(NULL, memory_map_size, PROT_READ | PROT_WRITE, > - MAP_SHARED, shm_fd, 0); > + MAP_SHARED | LTTNG_MAP_POPULATE, shm_fd, 0); > if (memory_map == MAP_FAILED) { > PERROR("mmap"); > goto error_mmap; > -- > 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] [PATCH lttng-ust] Use MAP_POPULATE to reduce pagefault when available

2019-07-29 Thread Mathieu Desnoyers
- On Jul 29, 2019, at 2:41 PM, Sebastien Boisvert sboisv...@gydle.com wrote: > nits: > > On 2019-07-29 2:32 p.m., Mathieu Desnoyers wrote: >>> A similar flag seems to exists on freebsd (MAP_PREFAULT_READ) but I do >> >> exists -> exit > >

Re: [lttng-dev] [PATCH lttng-ust] Use MAP_POPULATE to reduce pagefault when available

2019-07-29 Thread Mathieu Desnoyers
uct > shm_object_table *table, > > /* memory_map: mmap */ > memory_map = mmap(NULL, memory_map_size, PROT_READ | PROT_WRITE, > - MAP_SHARED, shm_fd, 0); > + MAP_SHARED | LTTNG_MAP_POPULATE, shm_fd, 0); > if (memory_map == MAP_FAILED) { > PERROR("mmap"); > goto error_mmap; > -- > 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] Fix: update sched prev_state instrumentation for kernel 4.14.0 and 4.20.0

2019-07-29 Thread Mathieu Desnoyers
ks are always > RUNNING > + * (we will not have dequeued if state != RUNNING). > + */ > +if (preempt) > +return TASK_REPORT_MAX; > + > +return 1 << task_state_index(p); > +} > + > +#elif (LINUX_VERSION_CODE >= KERNEL

Re: [lttng-dev] [PATCH lttng-ust] Fix: remove uninitialised value

2019-07-29 Thread Mathieu Desnoyers
args.stream.shm_fd, > &args.stream.wakeup_fd); > if (ret) { > goto error; > } > - lum->u.stream.len = memory_map_size; > > if (ops->cmd) >

Re: [lttng-dev] [PATCH lttng-ust] Fix: address GCC unaligned pointer warnings

2019-07-29 Thread Mathieu Desnoyers
-comm.c > +++ b/liblttng-ust/lttng-ust-comm.c > @@ -875,14 +875,18 @@ int handle_message(struct sock_info *sock_info, > } > case LTTNG_UST_STREAM: > { > + uint64_t memory_map_size; > + > /* Receive shm_fd, wakeup_fd */ >

Re: [lttng-dev] [PATCH v2 0/4] userspace-rcu: Add lock-free, ordered singly linked list

2019-07-29 Thread Mathieu Desnoyers
lete_rcu.c > create mode 100644 doc/examples/rculflist/cds_lflist_find_rcu.c > create mode 100644 doc/examples/rculflist/cds_lflist_insert_rcu.c > create mode 100644 include/urcu/rculflist.h > > -- > 1.8.3.1 > > ___ > lttng-dev mailing

Re: [lttng-dev] [PATCH v2 1/4] userspace-rcu: Add lock-free singly linked list rculflist

2019-07-29 Thread Mathieu Desnoyers
ution under LGPLv2.1 or LGPLv2.1+ ? This is the license we use for the entire Userspace RCU library. liburcu is meant to be used by non-GPL/LGPL programs as well. I'll wait until I get an answer from you on those points before digging further into the code. Thanks, Mathieu -- Mathieu

Re: [lttng-dev] 回复:Re: 回复:Re: Pros and Cons of LTTng

2019-07-25 Thread Mathieu Desnoyers
l be limited to the syscalls interface for the libc > observability unless you instrument it and distribute it. > Cheers. > _______ > lttng-dev mailing list > lttng-dev@lists.lttng.org > https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Re: [lttng-dev] HugePages shared memory support in LLTng

2019-07-25 Thread Mathieu Desnoyers
you as long as you > understand the pitfalls of each mode. > > 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 I

Re: [lttng-dev] [PATCH lttng-modules 1/2] Fix: missing define when not building with gcc

2019-07-04 Thread Mathieu Desnoyers
_bt_is_signed_type(type) ((type) -1 < (type) 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] [PATCH lttng-ust 1/2] Fix: missing define when not building with gcc

2019-07-04 Thread Mathieu Desnoyers
efine _BT_DIAG_IGNORE_TYPE_LIMITS > #endif > > #define _bt_is_signed_type(type) ((type) -1 < (type) 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] [OE-core] [PATCH v2] lttng-modules: Backport patches to fix compilation failures since kernel v5.1

2019-06-12 Thread Mathieu Desnoyers
- On Jun 12, 2019, at 3:27 PM, Adrian Bunk b...@stusta.de wrote: > On Wed, Jun 12, 2019 at 06:58:22AM -0400, Mathieu Desnoyers wrote: >>... >> We always integrate support for newer kernel versions instrumentation back >> into our current stable release. So as soon as 5.

Re: [lttng-dev] [OE-core] [PATCH v2] lttng-modules: Backport patches to fix compilation failures since kernel v5.1

2019-06-12 Thread Mathieu Desnoyers
- On Jun 12, 2019, at 1:10 PM, zhe he zhe...@windriver.com wrote: > On 6/12/19 6:58 PM, Mathieu Desnoyers wrote: >> - On Jun 12, 2019, at 12:51 PM, Adrian Bunk b...@stusta.de wrote: >> >>> On Tue, Jun 11, 2019 at 11:49:34PM +0100, Richard Purdie wrote: >>

Re: [lttng-dev] [OE-core] [PATCH v2] lttng-modules: Backport patches to fix compilation failures since kernel v5.1

2019-06-12 Thread Mathieu Desnoyers
So as soon as 5.2 final comes out, we will release a 2.10.x version including support for it in lttng-modules. The current 2.10.10 has commits to support the currently known 5.2-rc instrumentation changes. Thanks, Mathieu > >> Cheers, >> >> Richard > > cu > Adrian

[lttng-dev] [RELEASE] LTTng-modules 2.9.13, 2.10.10, 2.11.0-rc5 (Linux kernel tracer)

2019-06-11 Thread Mathieu Desnoyers
x: pipe: stop using ->can_merge (v5.1) * Fix: rcu: Remove wrapper definitions for obsolete RCU... (v5.1) * Fix: mm: create the new vm_fault_t type (v5.1) * Fix: extra-version-git.sh redirect stderr to /dev/null -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com

Re: [lttng-dev] [PATCH lttng-ust] Add setuid wrappers for per-UID buffers

2019-06-04 Thread Mathieu Desnoyers
ted after the UID change will be > fowarded fowarded -> forwarded The rest looks good, please add this tag to your next round for this patch: Acked-by: Mathieu Desnoyers I'll wait until feedback is provided on the testing side (lttng-tools) and the work on that front is fina

Re: [lttng-dev] [PATCH lttng-ust] Fix: namespace our gettid wrapper

2019-06-03 Thread Mathieu Desnoyers
--- a/liblttng-ust/lttng-context-vtid.c > +++ b/liblttng-ust/lttng-context-vtid.c > @@ -63,7 +63,7 @@ pid_t wrapper_getvtid(void) > > vtid = CMM_LOAD_SHARED(URCU_TLS(cached_vtid)); > if (caa_unlikely(!vtid)) { > - vtid = gettid(); > + vtid = l

Re: [lttng-dev] [RELEASE] Userspace RCU 0.11

2019-06-03 Thread Mathieu Desnoyers
- On May 6, 2019, at 4:32 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: > Hi, > > This is a 0.11 release of the Userspace RCU project. FYI, I just released a 0.11.1 tag of Userspace RCU which does a mandatory soname bump. Distributions wishing to package it should gr

Re: [lttng-dev] [PATCH urcu] Fix: SONAME bump to 6.1.0

2019-06-03 Thread Mathieu Desnoyers
s at > efficios dot com], [] > > # Following the numbering scheme proposed by libtool for the library version > # > http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html > -AC_SUBST([URCU_LIBRARY_VERSION], [6:0:1]) > +AC_SUBST([URCU_LIBRARY_VERSION], [7:0:1]

Re: [lttng-dev] [PATCH lttng-ust] Fix: get tid not pid in vtid context

2019-06-03 Thread Mathieu Desnoyers
(URCU_TLS(cached_vtid), vtid); > } > return vtid; > -- > 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

[lttng-dev] [PATCH babeltrace 1/1] Cleanup: test_bitfield: nr_bits should be unsigned

2019-05-30 Thread Mathieu Desnoyers
Should not have any effect on the code behavior, but removes useless type conversions between unsigned and signed types. Signed-off-by: Mathieu Desnoyers Change-Id: I39096ab89936875009a68d3ab8a4546c7f1eb8ae --- tests/lib/test_bitfield.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions

[lttng-dev] [PATCH babeltrace 1/1] Fix: test_bitfield: extend coverage: 0-len signed write/read

2019-05-29 Thread Mathieu Desnoyers
By convention, a 0-len bitfield write is a no-op, and a 0-len read sets the value of the output to 0. So we can "encode" the value 0 over a length of 0 bit. Cover this in the test-cases for signed types. It is already covered for the unsigned test-cases. Signed-off-by: Mathieu Desnoye

[lttng-dev] [PATCH babeltrace 1/1] Fix: test_bitfield: extend coverage by removing off-by-one in bound check

2019-05-29 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers Change-Id: I4fbf927d4b2ff1c8b68b05c7843298c64b68f5a4 --- tests/lib/test_bitfield.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/lib/test_bitfield.c b/tests/lib/test_bitfield.c index bc61e118..5188335b 100644

Re: [lttng-dev] Need help in converting trace data into CTF

2019-05-29 Thread Mathieu Desnoyers
- On May 29, 2019, at 12:19 PM, Ravindra Kumar Meena wrote: > On Fri, May 17, 2019 at 12:22 AM Mathieu Desnoyers < [ > mailto:mathieu.desnoy...@efficios.com | mathieu.desnoy...@efficios.com ] > > wrote: >> - On May 16, 2019, at 1:42 AM, Ravindra Kumar Mee

Re: [lttng-dev] [lttng-ust RFC v2] Add setuid wrapper for per-UID buffers

2019-05-28 Thread Mathieu Desnoyers
ge, we don't re-register the application for nothing. Sounds good? Sure, it works for me! Thanks, Mathieu > > - Original Message - > From: "Mathieu Desnoyers" > To: "Gabriel-Andrew Pollo-Guilbert" > Cc: "lttng-dev" > Sent: Wednesday,

Re: [lttng-dev] [lttng-ust RFC v3] Add setuid wrappers for per-UID buffers

2019-05-28 Thread Mathieu Desnoyers
UNT = 2 }; So we do not pollute the preprocessor namespace (e.g. output of gcc -dM -E file.c). Thanks, Mathieu -- 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] [RELEASE] LTTng-UST 2.9.5, 2.10.4 (Linux user-space tracer)

2019-05-24 Thread Mathieu Desnoyers
t access packet header for stream_id and stream_instance_id getters * compat: work around broken _SC_NPROCESSORS_CONF on MUSL libc * doc: remove repeated word in coding style * tap-driver.sh: flush stdout after each test result * Move wait_shm_mmap initialization to library const

[lttng-dev] [RFC PATCH lttng-tools stable-2.11/master] Fix: reintroduce lazy kernel modules load, fix empty syscall list

2019-05-23 Thread Mathieu Desnoyers
: Mathieu Desnoyers --- src/bin/lttng-sessiond/client.c| 11 +- src/bin/lttng-sessiond/cmd.c | 24 ++-- src/bin/lttng-sessiond/globals.c | 1 - src/bin/lttng-sessiond/kernel.c| 136 +++-- src/bin/lttng

[lttng-dev] [PATCH lttng-tools stable-2.9/2.10] Fix: initialize syscall table when kernel tracer is lazily initialized

2019-05-23 Thread Mathieu Desnoyers
How to reproduce: start lttng-sessiond while lttng-modules are not installed, then install lttng-modules. Then issue "lttng list --syscall -k". It will show an empty syscall list because the system call list has not been initialized. Signed-off-by: Mathieu Desnoyers --- src/bin/lttn

Re: [lttng-dev] [lttng-ust RFC v2] Add setuid wrapper for per-UID buffers

2019-05-22 Thread Mathieu Desnoyers
vely infrequent operation. > + */ > +void ust_after_setuid(void) > +{ > + DBG("Unregistering the process"); > + lttng_ust_fixup_tls(); > + lttng_ust_exit(); > + > + sem_count = LTTNG_UST_INIT_SEM_COUNT; > + lttng_ust_comm_should_quit = 0; > + initialized = 0; > + > + global_apps.wait_shm_mmap = NULL; > + local_apps.wait_shm_mmap = NULL; > + > + DBG("Registering the process under new UID=%u", getuid()); > + lttng_ust_init(); > +} > -- > 2.21.0 > > ___ > 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

Re: [lttng-dev] [PATCH lttng-modules 1/5] fix: timer/trace: Improve timer tracing (v5.2)

2019-05-22 Thread Mathieu Desnoyers
t; +#else > /** > * timer_expire_entry - called immediately before the timer callback > * @timer:pointer to struct timer_list > @@ -107,6 +128,7 @@ LTTNG_TRACEPOINT_EVENT(timer_expire_entry, > ctf_integer_hex(void *, function, timer->function) > ) > ) > +#en

Re: [lttng-dev] [lttng-ust RFC] Add setuid wrapper for per-UID buffers

2019-05-21 Thread Mathieu Desnoyers
quot;); > + lttng_ust_fixup_tls(); > + lttng_ust_exit(); > + > + sem_count = 2; Since we use it in code, we need to define (locally) e.g. #define LTTNG_UST_INIT_SEM_COUNT2 Just above the sem_count definition and use it. We try hard to never hardc

Re: [lttng-dev] [PATCH lttng-modules 4/5] fix: mm: move recent_rotated pages calculation to shrink_inactive_list() (v5.2)

2019-05-21 Thread Mathieu Desnoyers
e-event, it won't have any impact on lttng-modules. It would make sense to change those newly introduced exposed names in the upstream kernel as well though. Thanks, Mathieu > ctf_integer(unsigned long, nr_ref_keep, stat->nr_ref_keep) > ctf_integer(un

[lttng-dev] [PATCH babeltrace 1/1] Fix: test_bitfield: buffer overrun accesses

2019-05-18 Thread Mathieu Desnoyers
field coverage" Signed-off-by: Mathieu Desnoyers Change-Id: I14c9d69011b369e5dc8be4305ac8bf32cc86d3dd --- tests/lib/test_bitfield.c | 64 +++ 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/tests/lib/test_bitfield.c b/tests/lib/test_bitfie

[lttng-dev] [PATCH barectf 1/2] Fix: bitfield: shift undefined/implementation defined behaviors (v3)

2019-05-17 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Signed-off-by: Mathieu Desnoyers --- Changes since v1: - Fix wrong use of _$prefix$bt_make_mask() in _$prefix$bt_bitfield_write_be. Should be _$prefix$bt_make_mask_complement(). Changes since

[lttng-dev] [PATCH barectf 2/2] Cleanup: bitfields: streamline use of underscores

2019-05-17 Thread Mathieu Desnoyers
Do not prefix macro arguments with underscores. Use one leading underscore as prefix for local variables defined within macros. Signed-off-by: Mathieu Desnoyers --- barectf/templates.py | 210 +-- 1 file changed, 105 insertions(+), 105 deletions

[lttng-dev] [PATCH v2 babeltrace 4/4] Extend test_bitfield coverage

2019-05-16 Thread Mathieu Desnoyers
test_bitfield was mainly testing various write unit size. Add variations of read unit size as well. Previously, the test was only covering input from a 32-bit integer. Additionally test source and destination of 64-bit. Signed-off-by: Mathieu Desnoyers Change-Id

[lttng-dev] [PATCH babeltrace 3/4] Cleanup: bitfields: streamline use of underscores

2019-05-16 Thread Mathieu Desnoyers
Do not prefix macro arguments with underscores. Use one leading underscore as prefix for local variables defined within macros. Signed-off-by: Mathieu Desnoyers Change-Id: Ie1c2f7f59f605ac62d483aba67b3f70cef27bf21 --- include/babeltrace/bitfield-internal.h | 436

[lttng-dev] [PATCH v2 babeltrace 2/4] Silence compiler "always false comparison" warning

2019-05-16 Thread Mathieu Desnoyers
macro. Disable compiler warnings around use of that macro. Signed-off-by: Mathieu Desnoyers Change-Id: I2dd980e11ebd6cd37ae71b013925a6fca5d7b483 --- Changes since v1: - Use stdbool.h. --- include/babeltrace/bitfield-internal.h | 35 -- 1 file changed, 33 insertions

[lttng-dev] [PATCH v8 babeltrace 1/4] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-16 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Document that this header strictly respects the C99 standard, with the exception of its use of __typeof__. Adapt use of _bt_piecewise_lshift in plugins/text/pretty/print.c to the new API. Signed-o

[lttng-dev] [PATCH lttng-tools 5/6] Cleanup: test: don't stop relayd twice

2019-05-16 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers Acked-by: Jonathan Rajotte --- tests/regression/tools/live/test_lttng_ust | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/regression/tools/live/test_lttng_ust b/tests/regression/tools/live/test_lttng_ust index 06017d01..830fc783

[lttng-dev] [PATCH lttng-tools 2/3] lttng-ctl: notifications: use epoll()/poll() instead of select()

2019-05-16 Thread Mathieu Desnoyers
lttng epoll/poll wrapper instead. Signed-off-by: Mathieu Desnoyers --- src/lib/lttng-ctl/channel.c | 76 ++--- 1 file changed, 45 insertions(+), 31 deletions(-) diff --git a/src/lib/lttng-ctl/channel.c b/src/lib/lttng-ctl/channel.c index 5271aa13..bcecc65f 100644

[lttng-dev] [PATCH lttng-tools 3/3] sessiond: use epoll()/poll() instead of select()

2019-05-16 Thread Mathieu Desnoyers
select, use the lttng epoll/poll wrapper instead. Signed-off-by: Mathieu Desnoyers --- src/bin/lttng-sessiond/lttng-sessiond.h | 2 +- src/bin/lttng-sessiond/main.c | 2 +- src/bin/lttng-sessiond/thread-utils.c | 39 +++-- 3 files changed, 19 insertions(+), 24

[lttng-dev] [PATCH lttng-tools 6/6] tests: invoke full_cleanup from script trap handlers, use modprobe -r

2019-05-16 Thread Mathieu Desnoyers
oes not print errors if the module was not loaded yet when the signal occurs. Signed-off-by: Mathieu Desnoyers Acked-by: Jonathan Rajotte --- tests/regression/kernel/test_clock_override| 10 +++--- tests/regression/kernel/test_rotation_destroy_flush| 7 +++ tests/re

[lttng-dev] [PATCH lttng-tools 1/3] epoll/poll compat: expose interruptible API

2019-05-16 Thread Mathieu Desnoyers
Some use of the epoll/poll wrapper require interruption by signals to make the poll call return -1, errno EINTR. Expose a new lttng_poll_wait_interruptible API for this purpose. Signed-off-by: Mathieu Desnoyers --- src/common/compat/compat-epoll.c | 9 + src/common/compat/compat-poll.c

[lttng-dev] [PATCH lttng-tools 3/6] Fix: utils.sh: handle SIGPIPE

2019-05-16 Thread Mathieu Desnoyers
/null if a SIGPIPE is caught. Signed-off-by: Mathieu Desnoyers --- tests/utils/utils.sh | 12 1 file changed, 12 insertions(+) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 8f6381eb..53964027 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -68,9 +68,21

[lttng-dev] [PATCH lttng-tools 4/6] Fix: test: utils.sh: exit from process on full_cleanup

2019-05-16 Thread Mathieu Desnoyers
Signed-off-by: Mathieu Desnoyers --- tests/utils/utils.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/utils/utils.sh b/tests/utils/utils.sh index 53964027..ad3088d6 100644 --- a/tests/utils/utils.sh +++ b/tests/utils/utils.sh @@ -66,6 +66,7 @@ function full_cleanup () # The

[lttng-dev] [PATCH lttng-tools 2/6] Fix: tests: error handling in high throughput limits test (v2)

2019-05-16 Thread Mathieu Desnoyers
pt_cleanup trap handler rather than try to perform stopping of relayd and sessiond within the script. Signed-off-by: Mathieu Desnoyers --- Changes since v1: - Issue reset_bw_limit when set_bw_limit fails. --- .../streaming/test_high_throughput_limits | 48 ++- 1 file c

[lttng-dev] [PATCH lttng-tools 1/6] Improve handling of test SIGTERM/SIGINT (v2)

2019-05-16 Thread Mathieu Desnoyers
nit script shutdown behavior. Signed-off-by: Mathieu Desnoyers --- Changes since v1: - Take care of feedback from Jonathan Rajotte, - Run through shellcheck. --- tests/utils/utils.sh | 296 +-- 1 file changed, 204 insertions(+), 92 deletions(-) diff --git a/t

Re: [lttng-dev] Need help in converting trace data into CTF

2019-05-16 Thread Mathieu Desnoyers
ndian School of > Mines) ] , Dhanbad > ___ > 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 _

Re: [lttng-dev] [PATCH lttng-tools 1/9] Improve handling of test SIGTERM/SIGINT

2019-05-16 Thread Mathieu Desnoyers
ctions applies to the others since the changes > are similar. OK > > On Fri, May 03, 2019 at 09:55:39AM -0400, Mathieu Desnoyers wrote: >> The current state of signal handling for test scripts is: on >> SIGTERM/SIGINT of the tests (e.g. a CTRL-C on the console), session >>

Re: [lttng-dev] [PATCH lttng-tools 2/9] Fix: tests: error handling in high throughput limits test

2019-05-15 Thread Mathieu Desnoyers
Thanks, Mathieu > >> >> start_lttng_sessiond >> start_lttng_relayd "-o $TRACE_PATH" >> @@ -185,5 +204,6 @@ skip $isroot "Root access is needed to set bandwith >> limits. >> Skipping all tests." >>

[lttng-dev] [PATCH v2 barectf 1/1] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-15 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Signed-off-by: Mathieu Desnoyers --- Changes since v1: - Fix wrong use of _$prefix$bt_make_mask() in _$prefix$bt_bitfield_write_be. Should be _$prefix$bt_make_mask_complement(). --- ba

Re: [lttng-dev] [PATCH barectf 1/1] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-15 Thread Mathieu Desnoyers
- On May 14, 2019, at 4:42 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: [...] > > #define _$prefix$bt_bitfield_write_be(_ptr, type, _start, _length, _vtype, _v) > \\ > do { \\ > - _

Re: [lttng-dev] [PATCH lttng-modules 1/2] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-15 Thread Mathieu Desnoyers
- On May 14, 2019, at 4:37 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: [...] > > #define _bt_bitfield_write_be(_ptr, type, _start, _length, _v) > \ > do { \ > - typeo

Re: [lttng-dev] [PATCH lttng-ust 1/2] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-15 Thread Mathieu Desnoyers
- On May 14, 2019, at 4:36 PM, Mathieu Desnoyers mathieu.desnoy...@efficios.com wrote: [...] \ > > #define _bt_bitfield_write_be(_ptr, type, _start, _length, _v) &g

[lttng-dev] [PATCH babeltrace 4/4] Cleanup: test_bitfield: pass source integers as parameters

2019-05-15 Thread Mathieu Desnoyers
It is a good practice to pass arguments as parameters rather than through global variables. Signed-off-by: Mathieu Desnoyers Change-Id: I0d7cc94b1d492ca53ad29b1d39831ee6288b2672 --- tests/lib/test_bitfield.c | 85 +-- 1 file changed, 30 insertions

[lttng-dev] [PATCH v7 babeltrace 1/4] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-15 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Document that this header strictly respects the C99 standard, with the exception of its use of __typeof__. Adapt use of _bt_piecewise_lshift in plugins/text/pretty/print.c to the new API. Signed-o

[lttng-dev] [PATCH babeltrace 3/4] Extend test_bitfield coverage

2019-05-15 Thread Mathieu Desnoyers
test_bitfield was mainly testing various write unit size. Add variations of read unit size as well. Previously, the test was only covering input from a 32-bit integer. Additionally test source and destination of 64-bit. Signed-off-by: Mathieu Desnoyers Change-Id

[lttng-dev] [PATCH babeltrace 2/4] Silence compiler "always false comparison" warning

2019-05-15 Thread Mathieu Desnoyers
macro. Disable compiler warnings around use of that macro. Signed-off-by: Mathieu Desnoyers Change-Id: I2dd980e11ebd6cd37ae71b013925a6fca5d7b483 --- include/babeltrace/bitfield-internal.h | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/i

[lttng-dev] [PATCH barectf 1/1] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Signed-off-by: Mathieu Desnoyers --- barectf/templates.py | 173 +++ 1 file changed, 146 insertions(+), 27 deletions(-) diff --git a/barect

[lttng-dev] [PATCH lttng-modules 1/2] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Document that this header strictly respects the C99 standard, with the exception of its use of __typeof__. Signed-off-by: Mathieu Desnoyers fix -

[lttng-dev] [PATCH lttng-modules 2/2] Silence compiler "always false comparison" warning

2019-05-14 Thread Mathieu Desnoyers
macro. Disable compiler warnings around use of that macro. Signed-off-by: Mathieu Desnoyers https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[lttng-dev] [PATCH lttng-ust 2/2] Silence compiler "always false comparison" warning

2019-05-14 Thread Mathieu Desnoyers
macro. Disable compiler warnings around use of that macro. Signed-off-by: Mathieu Desnoyers https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

[lttng-dev] [PATCH lttng-ust 1/2] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-14 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Document that this header strictly respects the C99 standard, with the exception of its use of __typeof__. Signed-off-by: Mathieu Desnoyers --- includ

[lttng-dev] [PATCH babeltrace 4/4] Cleanup: test_bitfield: pass source integers as parameters

2019-05-14 Thread Mathieu Desnoyers
It is a good practice to pass arguments as parameters rather than through global variables. Signed-off-by: Mathieu Desnoyers Change-Id: I0d7cc94b1d492ca53ad29b1d39831ee6288b2672 --- tests/lib/test_bitfield.c | 85 +-- 1 file changed, 30 insertions

[lttng-dev] [PATCH babeltrace 3/4] Extend test_bitfield coverage

2019-05-14 Thread Mathieu Desnoyers
test_bitfield was mainly testing various write unit size. Add variations of read unit size as well. Previously, the test was only covering input from a 32-bit integer. Additionally test source and destination of 64-bit. Signed-off-by: Mathieu Desnoyers Change-Id

[lttng-dev] [PATCH babeltrace 1/4] Fix: bitfield: shift undefined/implementation defined behaviors (v6)

2019-05-14 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Document that this header strictly respects the C99 standard, with the exception of its use of __typeof__. Adapt use of _bt_piecewise_lshift in plugins/text/pretty/print.c to the new API. Signed-o

[lttng-dev] [PATCH babeltrace 2/4] Silence compiler "always false comparison" warning

2019-05-14 Thread Mathieu Desnoyers
macro. Disable compiler warnings around use of that macro. Signed-off-by: Mathieu Desnoyers Change-Id: I2dd980e11ebd6cd37ae71b013925a6fca5d7b483 --- include/babeltrace/bitfield-internal.h | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/i

[lttng-dev] [PATCH v5 babeltrace 1/1] Fix: bitfield: shift undefined/implementation defined behaviors

2019-05-13 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Document that this header strictly respects the C89 standard, with the exception of its use of __typeof__. Adapt use of _bt_piecewise_lshift in plugins/text/pretty/print.c to the new API. Signed-o

[lttng-dev] [PATCH babeltrace 4/4] Silence compiler "always false comparison" warning

2019-05-13 Thread Mathieu Desnoyers
macro. Disable compiler warnings around use of that macro. Signed-off-by: Mathieu Desnoyers Change-Id: I2dd980e11ebd6cd37ae71b013925a6fca5d7b483 --- include/babeltrace/bitfield-internal.h | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/i

[lttng-dev] [PATCH babeltrace 3/4] Cleanup: test-bitfield: pass source integers as parameters

2019-05-13 Thread Mathieu Desnoyers
It is a good practice to pass arguments as parameters rather than through global variables. Signed-off-by: Mathieu Desnoyers Change-Id: I0d7cc94b1d492ca53ad29b1d39831ee6288b2672 --- tests/lib/test_bitfield.c | 85 +-- 1 file changed, 30 insertions

[lttng-dev] [PATCH babeltrace 2/4] Extend test_bitfield coverage

2019-05-13 Thread Mathieu Desnoyers
test_bitfield was mainly testing various write unit size. Add variations of read unit size as well. Previously, the test was only covering input from a 32-bit integer. Additionally test source and destination of 64-bit. Signed-off-by: Mathieu Desnoyers Change-Id

[lttng-dev] [PATCH babeltrace 1/4] Fix: bitfield: shift undefined/implementation defined behaviors (v4)

2019-05-13 Thread Mathieu Desnoyers
e that the compiler representation for signed values is two's complement, which is expected by this header. Signed-off-by: Mathieu Desnoyers Change-Id: I779a55228c6256188eddc94ced6ceb77ffc8515d --- Changes since v1: - Generate compile-time error if the type argument passed to _bt_unsigned_cast() is lar

Re: [lttng-dev] [PATCH babeltrace 2/2] Extend test-bitfield coverage

2019-05-12 Thread Mathieu Desnoyers
- On May 10, 2019, at 5:11 PM, Simon Marchi simon.mar...@efficios.com wrote: > On 2019-05-10 1:47 p.m., Mathieu Desnoyers wrote: >> test-bitfield was mainly testing various write unit size. Add >> variations of read unit size as well. >> >> Previously, the test was

Re: [lttng-dev] [lttng-ust] duplicated struct ustctl_consumer_channel_attr

2019-05-10 Thread Mathieu Desnoyers
-tools) instead of just one ? > > It just seems redundant to me. Answering this very relevant question requires recalling a bit of lttng 2.x history. Back when we introduced lttng-ust support into the lttng-tools project: commit 3bd1e0819b577ffcb44acd7c2f8e02ff09654b7b Author: Mathieu Desno

Re: [lttng-dev] [PATCH lttng-ust v2] Fix: allocate ts_end in ringbuffer shared memory

2019-05-10 Thread Mathieu Desnoyers
- On May 10, 2019, at 3:16 PM, Sebastien Boisvert sboisv...@gydle.com wrote: > On 2019-05-10 2:00 p.m., Mathieu Desnoyers wrote: [...] >>> [sboisvert@GT480:lttng-ust]$ ./configure >>> --prefix=/home/sboisvert/open-source/lttng.org/Build/lttng-ust/v2.9.4 >>>

Re: [lttng-dev] [PATCH lttng-ust v2] Fix: allocate ts_end in ringbuffer shared memory

2019-05-10 Thread Mathieu Desnoyers
;> b/libringbuffer/ring_buffer_backend.c >> index a0ef7446..431b8eae 100644 >> --- a/libringbuffer/ring_buffer_backend.c >> +++ b/libringbuffer/ring_buffer_backend.c >> @@ -341,6 +341,9 @@ int channel_backend_init(struct channel_backend *chanb, >> s

[lttng-dev] [PATCH babeltrace 2/2] Extend test-bitfield coverage

2019-05-10 Thread Mathieu Desnoyers
@@ * * BabelTrace - bitfield test program * - * Copyright 2010 - Mathieu Desnoyers + * Copyright 2010-2019 - Mathieu Desnoyers * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,39 +40,109 @@ void

[lttng-dev] [PATCH babeltrace v4 1/2] Fix: bitfield: left shift undefined behavior

2019-05-10 Thread Mathieu Desnoyers
These are called the integer promotions. All other types are unchanged by the integer promotions. We also need to cast the result explicitly into the left hand side type to deal with: warning: large integer implicitly truncated to unsigned type [-Woverflow] Signed-off-by: Mathieu D

Re: [lttng-dev] [PATCH lttng-ust v2] Fix: allocate ts_end in ringbuffer shared memory

2019-05-10 Thread Mathieu Desnoyers
f(struct commit_counters_cold) * num_subbuf; > + /* Sampled timestamp end */ > + shmsize += offset_align(shmsize, __alignof__(uint64_t)); > + shmsize += sizeof(uint64_t) * num_subbuf; > > if (config->alloc == RING_BUFFER_ALLOC_PER_CPU) { > struct l

[lttng-dev] [PATCH babeltrace v3] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
These are called the integer promotions. All other types are unchanged by the integer promotions. We also need to cast the result explicitly into the left hand side type to deal with: warning: large integer implicitly truncated to unsigned type [-Woverflow] Signed-off-by: Mathieu Desnoyers

Re: [lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
- On May 8, 2019, at 12:08 PM, Simon Marchi simon.mar...@efficios.com wrote: > On 2019-05-08 11:59 a.m., Mathieu Desnoyers wrote: >> What compiler do you use, and which compilation flags ? >> (it works here) > > "gcc (Ubuntu 7.4.0-1ubuntu1~18.04) 7.4.0",

Re: [lttng-dev] [PATCH babeltrace v2] Fix: bitfield: left shift undefined behavior

2019-05-08 Thread Mathieu Desnoyers
- On May 8, 2019, at 11:49 AM, Simon Marchi sim...@simark.ca wrote: > On 2019-05-08 10:39 a.m., Mathieu Desnoyers wrote: >> bitfield.h uses the left shift operator with a left operand which >> may be negative. The C99 standard states that shifting a negative >> value is u

<    1   2   3   4   5   6   7   8   9   10   >