Re: [lttng-dev] What is _prev_state in sched_switch?

2019-07-29 Thread Ravindra Kumar Meena
> > > On 2019-07-24 2:44 a.m., Ravindra Kumar Meena wrote: > > > Hi, > > > > > > I had a looked at TraceCompass example. I came across sched_swithc > event in present in the metadata. > > > > > > event { > > > name = "sched_switch"; > > > id = 27; > > > stream_id

Re: [lttng-dev] What is _prev_state in sched_switch?

2019-07-29 Thread Christophe Bédard
Hi, Re-sending since I previously used an email address not subscribed to the ML. On Mon, 29 Jul 2019 at 11:08, Ravindra Kumar Meena wrote: > Okay. The above link was somewhat helpful but I still didn't get what is > the meaning of {0, 1, 1026, 4096} values in _prev_state. > > In babeltrace out

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

2019-07-29 Thread Junchang Wang
Hi Mathieu and the list, I'm recently using userspace-rcu to build lock-free data structures. Thanks for sharing this excellent project! In building a hash table, I am looking for an ordered singly linked list that is lock-free. It seems such a list is missing in userspace-rcu. I discussed this w

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

2019-07-29 Thread Junchang Wang
Signed-off-by: Junchang Wang --- include/urcu/rculflist.h | 284 +++ 1 file changed, 284 insertions(+) create mode 100644 include/urcu/rculflist.h diff --git a/include/urcu/rculflist.h b/include/urcu/rculflist.h new file mode 100644 index 000..35c

[lttng-dev] [PATCH v2 2/4] userspace-rcu: Add sample code of rculflist

2019-07-29 Thread Junchang Wang
Signed-off-by: Junchang Wang --- doc/examples/rculflist/Makefile| 24 + .../rculflist/Makefile.cds_lflist_delete_rcu | 21 + .../rculflist/Makefile.cds_lflist_find_rcu | 21 + .../rculflist/Makefile.cds_lflist_insert_rcu | 21 + doc/exam

[lttng-dev] [PATCH v2 3/4] userspace-rcu: Update Makefile.am to include rculflist into the project

2019-07-29 Thread Junchang Wang
Signed-off-by: Junchang Wang --- include/Makefile.am | 1 + include/urcu/cds.h | 1 + 2 files changed, 2 insertions(+) diff --git a/include/Makefile.am b/include/Makefile.am index 34812d4..c4de329 100644 --- a/include/Makefile.am +++ b/include/Makefile.am @@ -2,6 +2,7 @@ nobase_dist_include_HEA

[lttng-dev] [PATCH v2 4/4] userspace-rcu: Add a brief description of rculflist in cds-api.md

2019-07-29 Thread Junchang Wang
Signed-off-by: Junchang Wang --- doc/cds-api.md | 7 +++ 1 file changed, 7 insertions(+) diff --git a/doc/cds-api.md b/doc/cds-api.md index 49a3c7c..577126a 100644 --- a/doc/cds-api.md +++ b/doc/cds-api.md @@ -82,3 +82,10 @@ are supported. Provides "uniquify add" and "replace add" operation

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

2019-07-29 Thread Mathieu Desnoyers
- On Jul 29, 2019, at 9:35 AM, Junchang Wang junchangw...@gmail.com wrote: > Signed-off-by: Junchang Wang Hi Junchang, Thanks for submitting this! I've been on vacation for the past two weeks, hence the delay in reply. A few points: I think we should move the implementation of find/insert

Re: [lttng-dev] [lttng-ust][PATCH V2] Add config time check for new gettid API

2019-07-29 Thread Sebastien Boisvert
On 2019-07-26 5:27 p.m., Khem Raj wrote: >> >> I don't see the definition of gettid(). > > its a syscall wrapper which is generated during build from > sysdeps/unix/sysv/linux/syscalls.list > OK, now I understand, thanks ! ___ lttng-dev mailing list l

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

2019-07-29 Thread Mathieu Desnoyers
- On Jul 29, 2019, at 9:35 AM, Junchang Wang junchangw...@gmail.com wrote: > Hi Mathieu and the list, > > I'm recently using userspace-rcu to build lock-free data structures. Thanks > for > sharing this excellent project! > > In building a hash table, I am looking for an ordered singly link

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

2019-07-29 Thread Mathieu Desnoyers
Merged into master, 2.11, 2.10, 2.9, thanks! Mathieu - On Jul 26, 2019, at 6:00 PM, Gabriel-Andrew Pollo-Guilbert gabriel.pollo-guilb...@efficios.com wrote: > The release of GCC 9 added the following warning: > > -Waddress-of-packed-member, enabled by default, warns about an >

Re: [lttng-dev] What is _prev_state in sched_switch?

2019-07-29 Thread Sebastien Boisvert
On 2019-07-29 5:07 a.m., Ravindra Kumar Meena wrote: > Okay. The above link was somewhat helpful but I still didn't get what is the > meaning of {0, 1, 1026, 4096} values in _prev_state.  > Christophe explained, the values of _prev_state. In addition, I suggest you read those links (from gene

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

2019-07-29 Thread Gabriel-Andrew Pollo-Guilbert
Commit 973eac638e4fd introduces an uninitialised value that may prevent shared memory from being allocated. The compiler didn't give any warning because the pointer to the value is sent to a function that don't do anything with it. We simply pass NULL to that function. --- liblttng-ust/lttng-ust-c

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

2019-07-29 Thread Mathieu Desnoyers
Merged into master, 2.11, 2.10, 2.9, thanks! Mathieu - On Jul 29, 2019, at 11:14 AM, Gabriel-Andrew Pollo-Guilbert gabriel.pollo-guilb...@efficios.com wrote: > Commit 973eac638e4fd introduces an uninitialised value that may prevent > shared memory from being allocated. The compiler didn't g

[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 Gabriel-Andrew Pollo-Guilbert
Upstream Linux kernel commit in 4.14.0: commit efb40f588b4370ffaeffafbd50f6ff213d954254 Author: Peter Zijlstra Date: Fri Sep 22 18:19:53 2017 +0200 sched/tracing: Fix trace_sched_switch task-state printing commit 3f5fe9fef5b2da06b6319fab8123056da5217c3f Author: Thomas Gleixner Date: We

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
- On Jul 29, 2019, at 11:46 AM, Gabriel-Andrew Pollo-Guilbert gabriel.pollo-guilb...@efficios.com wrote: > Upstream Linux kernel commit in 4.14.0: > > commit efb40f588b4370ffaeffafbd50f6ff213d954254 > Author: Peter Zijlstra > Date: Fri Sep 22 18:19:53 2017 +0200 > >sched/tracing: Fix

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

2019-07-29 Thread Jonathan Rajotte
Any ring buffer configuration bigger than PAGE_SIZE would result in increase latency for the first tracepoint hit (1200ns) lending on a new PAGE_SIZE sized chunk of the mapped memory. This happens at least for the first ring buffer traversal. To alleviate this we can use MAP_POPULATE that will "pr

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:23 PM, Jonathan Rajotte jonathan.rajotte-jul...@efficios.com wrote: > Any ring buffer configuration bigger than PAGE_SIZE would result > in increase latency for the first tracepoint hit (1200ns) lending on a landing > new PAGE_SIZE sized chunk of the mapped memory. T

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

2019-07-29 Thread Sebastien Boisvert
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 exist ? >> [1] https://lists.lttng.org/pipermail/lttng-dev/2019-July/029122.html >> >> Tested-by: Yiteng Guo [1] > > I think you might want t

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

2019-07-29 Thread Sebastien Boisvert
On 2019-07-29 2:23 p.m., Jonathan Rajotte wrote: > Any ring buffer configuration bigger than PAGE_SIZE would result > in increase latency for the first tracepoint hit (1200ns) lending on a in an increased latency ___ lttng-dev mailing list lttng-dev@l

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 > > exist ? Indeed :) > > >>> [1] https://lists.lttn

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

2019-07-29 Thread Jonathan Rajotte
Any ring buffer configuration bigger than PAGE_SIZE would result in an increased latency for the first tracepoint hit (1200ns) landing on a new PAGE_SIZE sized chunk of the mapped memory. This happens at least for the first ring buffer traversal. To alleviate this we can use MAP_POPULATE that will

[lttng-dev] gcc plugin for instrumenting individual functions

2019-07-29 Thread Christophe Bédard
Hi, Sharing this just in case it can help someone! gcc only lets you disable instrumentation, using the `no_instrument_function` attribute, or by matching file names. It does not let you explicitly choose the individual functions you want to instrument. I've searched many times for a way to do i

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:49 PM, Jonathan Rajotte jonathan.rajotte-jul...@efficios.com wrote: > Any ring buffer configuration bigger than PAGE_SIZE would result > in an increased latency for the first tracepoint hit (1200ns) landing on a > new PAGE_SIZE sized chunk of the mapped memory. This ha

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 increased latency for t

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...@efficios.com wrote: >>

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

2019-07-29 Thread Jonathan Rajotte-Julien
> @Jonathan: This is my first time to get involved in an open-source > project on the mailing list. I don't quite know how RFC works. Should > I just do `git format-patch` and copy-paste the diff to an email? Is > there any specific format for the RFC email and its title? Copy paste to email is th

Re: [lttng-dev] gcc plugin for instrumenting individual functions

2019-07-29 Thread Jonathan Rajotte-Julien
Hi, For those at home wondering why this would be relevant to lttng, lttng-ust comes with a utility shared object allowing you to leverage the -finstrument-function sites to hook lttng tracepoints [1]. [1] https://lttng.org/man/3/lttng-ust-cyg-profile/v2.10/ Thanks Christophe for this contributi

[lttng-dev] perf dynamic tracepoints and lttng

2019-07-29 Thread Sebastien Boisvert
Hi, Can lttng (LTTng-UST) see perf dynamic probes ? # perf probe --list probe_libc:malloc_8 probe_libc:malloc_8 (on __libc_malloc@glibc-2.27/malloc/malloc.c in /lib/x86_64-linux-gnu/libc-2.27.so) # lttng list -u UST events: - None (Yes, I am doing this as root..., since libc-2

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

2019-07-29 Thread Gabriel-Andrew Pollo-Guilbert
In the case of short lived applications, the application may exit before the initial statedump has completed. Higher-level trace analysis features such as translating addresses to symbols rely on statedump. That information is required for those analyses to work on such short-lived applications.

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

2019-07-29 Thread 杨海
Hi Mathieu, Thanks. I am looking for packages for older distributions 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 2