Re: [RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-02-03 Thread Yang Jihong
Hello, On 2024/2/4 6:00, Paul E. McKenney wrote: On Mon, Jan 29, 2024 at 08:58:10AM +0800, Yang Jihong wrote: Hello, On 2024/1/28 3:22, Paul E. McKenney wrote: On Tue, Jan 09, 2024 at 07:28:29PM +0800, Yang Jihong wrote: Hello, PING. I had a similar problem. Is this solution feasible

Re: [RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-01-28 Thread Yang Jihong
Hello, On 2024/1/28 3:22, Paul E. McKenney wrote: On Tue, Jan 09, 2024 at 07:28:29PM +0800, Yang Jihong wrote: Hello, PING. I had a similar problem. Is this solution feasible? Sadly, no. It fails on CONFIG_PREEMPT=y kernels because synchronize_rcu_tasks_rude() will not wait on tasks

Re: [RFC PATCH] kprobes: Use synchronize_rcu_tasks_rude in kprobe_optimizer

2024-01-09 Thread Yang Jihong
Hello, PING. I had a similar problem. Is this solution feasible? Thanks, Yang On 2024/1/2 11:40, Chen Zhongjin wrote: There is a deadlock scenario in kprobe_optimizer(): pid A pid B pid C kprobe_optimizer() do_exit()

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-04-12 Thread Yang Jihong
Hello, Arnaldo, On 2021/3/31 10:18, Yang Jihong wrote: Hello, Namhyung  and Arnaldo, On 2021/3/30 15:26, Namhyung Kim wrote: Hi Yang and Arnaldo, On Sat, Mar 27, 2021 at 11:16 AM Yang Jihong wrote: On 2021/3/26 20:06, Arnaldo Carvalho de Melo wrote: So it seems to be working, what am I

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-03-30 Thread Yang Jihong
Hello, Namhyung and Arnaldo, On 2021/3/30 15:26, Namhyung Kim wrote: Hi Yang and Arnaldo, On Sat, Mar 27, 2021 at 11:16 AM Yang Jihong wrote: On 2021/3/26 20:06, Arnaldo Carvalho de Melo wrote: So it seems to be working, what am I missing? Is this strictly non group related? Yes

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-03-26 Thread Yang Jihong
Hello, On 2021/3/26 20:06, Arnaldo Carvalho de Melo wrote: Em Fri, Mar 26, 2021 at 12:25:37PM +0900, Namhyung Kim escreveu: On Fri, Mar 26, 2021 at 11:24 AM Yang Jihong wrote: On 2021/3/19 20:35, Yang Jihong wrote: In hist__find_annotations function, since different hist_entry may point

Re: [PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-03-25 Thread Yang Jihong
Hello, ping :) On 2021/3/19 20:35, Yang Jihong wrote: In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid re

Re: [PATCH v6] perf annotate: Fix sample events lost in stdio mode

2021-03-22 Thread Yang Jihong
Hello, On 2021/3/18 14:13, Namhyung Kim wrote: Hello, On Wed, Mar 17, 2021 at 6:44 PM Yang Jihong wrote: In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, en

Re: [PATCH v6] perf annotate: Fix sample events lost in stdio mode

2021-03-19 Thread Yang Jihong
On 2021/3/18 14:13, Namhyung Kim wrote: Hello, On Wed, Mar 17, 2021 at 6:44 PM Yang Jihong wrote: In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, en

[PATCH v7] perf annotate: Fix sample events lost in stdio mode

2021-03-19 Thread Yang Jihong
tput when different processes correspond to the same symbol. Signed-off-by: Yang Jihong --- Changes since v6: - Remove separate setup_sorting() for branch mode. Changes since v5: - Add Signed-off-by tag. Changes since v4: - Use the same sort key "dso,symbol" in branch stack mode.

Re: [PATCH v5] perf annotate: Fix sample events lost in stdio mode

2021-03-17 Thread Yang Jihong
Hello, On 2021/3/16 21:07, Arnaldo Carvalho de Melo wrote: Em Tue, Mar 16, 2021 at 10:17:59AM +0800, Yang Jihong escreveu: In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; w

[PATCH v6] perf annotate: Fix sample events lost in stdio mode

2021-03-17 Thread Yang Jihong
tput when different processes correspond to the same symbol. Signed-off-by: Yang Jihong --- Changes since v5: - Add Signed-off-by tag. Changes since v4: - Use the same sort key "dso,symbol" in branch stack mode. Changes since v3: - Modify the first line of comments. Chang

Re: [PATCH v4] perf annotate: Fix sample events lost in stdio mode

2021-03-15 Thread Yang Jihong
Hello, On 2021/3/13 11:06, Namhyung Kim wrote: On Sat, Mar 13, 2021 at 11:16 AM Yang Jihong wrote: In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, en

[PATCH v5] perf annotate: Fix sample events lost in stdio mode

2021-03-15 Thread Yang Jihong
In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated output. However, there is a problem, for example, run the

Re: [PATCH v4] perf annotate: Fix sample events lost in stdio mode

2021-03-15 Thread Yang Jihong
Hi, On 2021/3/13 11:06, Namhyung Kim wrote: On Sat, Mar 13, 2021 at 11:16 AM Yang Jihong wrote: In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, en

Re: [PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-12 Thread Yang Jihong
Hello, On 2021/3/13 10:00, Yang Jihong wrote: Hello, Namhyung On 2021/3/12 18:20, Yang Jihong wrote: Hello, On 2021/3/12 16:39, Namhyung Kim wrote: On Fri, Mar 12, 2021 at 4:19 PM Yang Jihong wrote: Hello, On 2021/3/12 13:49, Namhyung Kim wrote: Hi, On Fri, Mar 12, 2021 at 12:24 PM

[PATCH v4] perf annotate: Fix sample events lost in stdio mode

2021-03-12 Thread Yang Jihong
In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated output. However, there is a problem, for example, run the

Re: [PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-12 Thread Yang Jihong
Hello, Namhyung On 2021/3/12 18:20, Yang Jihong wrote: Hello, On 2021/3/12 16:39, Namhyung Kim wrote: On Fri, Mar 12, 2021 at 4:19 PM Yang Jihong wrote: Hello, On 2021/3/12 13:49, Namhyung Kim wrote: Hi, On Fri, Mar 12, 2021 at 12:24 PM Yang Jihong wrote: Hello, Namhyung On 2021/3

[PATCH v3] perf annotate: Fix sample events lost in stdio mode

2021-03-12 Thread Yang Jihong
In hist__find_annotations function, since different hist_entry may point to same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated output. However, there is a problem, for example, run the

Re: [PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-12 Thread Yang Jihong
Hello, On 2021/3/12 16:39, Namhyung Kim wrote: On Fri, Mar 12, 2021 at 4:19 PM Yang Jihong wrote: Hello, On 2021/3/12 13:49, Namhyung Kim wrote: Hi, On Fri, Mar 12, 2021 at 12:24 PM Yang Jihong wrote: Hello, Namhyung On 2021/3/11 22:42, Namhyung Kim wrote: Hi, On Thu, Mar 11, 2021

Re: [PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-11 Thread Yang Jihong
Hello, On 2021/3/12 13:49, Namhyung Kim wrote: Hi, On Fri, Mar 12, 2021 at 12:24 PM Yang Jihong wrote: Hello, Namhyung On 2021/3/11 22:42, Namhyung Kim wrote: Hi, On Thu, Mar 11, 2021 at 5:48 PM Yang Jihong wrote: Hello, On 2021/3/6 16:28, Yang Jihong wrote

Re: [PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-11 Thread Yang Jihong
Hello, Namhyung On 2021/3/11 22:42, Namhyung Kim wrote: Hi, On Thu, Mar 11, 2021 at 5:48 PM Yang Jihong wrote: Hello, On 2021/3/6 16:28, Yang Jihong wrote: In hist__find_annotations function, since have a hist_entry per IP for the same symbol, we free notes->src to signal alre

[PATCH v2] perf annotate: Fix sample events lost in stdio mode

2021-03-11 Thread Yang Jihong
In hist__find_annotations function, since have a hist_entry per IP for the same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated output. However, there is a problem, for example, run the

Re: [PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-11 Thread Yang Jihong
Hello, On 2021/3/6 16:28, Yang Jihong wrote: In hist__find_annotations function, since have a hist_entry per IP for the same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated

[PATCH] perf annotate: Fix sample events lost in stdio mode

2021-03-06 Thread Yang Jihong
In hist__find_annotations function, since have a hist_entry per IP for the same symbol, we free notes->src to signal already processed this symbol in stdio mode; when annotate, entry will skipped if notes->src is NULL to avoid repeated output. However, there is a problem, for example, run the

Re: [PATCH] perf record: Fix continue profiling after draining the buffer

2021-03-03 Thread Yang Jihong
On 2021/3/4 0:43, Arnaldo Carvalho de Melo wrote: Em Mon, Feb 22, 2021 at 09:31:51AM +0800, Yang Jihong escreveu: Hello, On 2021/2/19 1:09, Arnaldo Carvalho de Melo wrote: Em Thu, Feb 18, 2021 at 10:20:53AM -0300, Arnaldo Carvalho de Melo escreveu: Em Fri, Feb 05, 2021 at 11:46:12AM +0100

Re: [PATCH] perf record: Fix continue profiling after draining the buffer

2021-02-21 Thread Yang Jihong
:50 PM Yang Jihong wrote: commit da231338ec9c098707c8a1e4d8a50e2400e2fe17 uses eventfd to solve rare race where the setting and checking of 'done' which add done_fd to pollfd. When draining buffer, revents of done_fd is 0 and evlist__filter_pollfd function returns a non-zero value. As a result

Re: [PATCH] perf record: Fix continue profiling after draining the buffer

2021-02-18 Thread Yang Jihong
Hello, On 2021/2/7 8:56, Yang Jihong wrote: Hello, On 2021/2/5 18:46, Jiri Olsa wrote: On Fri, Feb 05, 2021 at 07:35:22PM +0900, Namhyung Kim wrote: Hello, On Fri, Feb 5, 2021 at 3:50 PM Yang Jihong wrote: commit da231338ec9c098707c8a1e4d8a50e2400e2fe17 uses eventfd to solve rare race

Re: [PATCH] perf record: Fix continue profiling after draining the buffer

2021-02-06 Thread Yang Jihong
Hello, On 2021/2/5 18:46, Jiri Olsa wrote: On Fri, Feb 05, 2021 at 07:35:22PM +0900, Namhyung Kim wrote: Hello, On Fri, Feb 5, 2021 at 3:50 PM Yang Jihong wrote: commit da231338ec9c098707c8a1e4d8a50e2400e2fe17 uses eventfd to solve rare race where the setting and checking of 'done' which

[PATCH] perf record: Fix continue profiling after draining the buffer

2021-02-04 Thread Yang Jihong
ffer is draining and need to stop profiling. Use fdarray_flag__nonfilterable to set done eventfd to nonfilterable objects, so that evlist__filter_pollfd does not filter and check done eventfd. Fixes: da231338ec9c (perf record: Use an eventfd to wakeup when done) Signed-off-by: Yang Jihong --- tools/