[PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-27 Thread Jiri Olsa
Currently we enable the breakpoint back only if the breakpoint modification was successful. If it fails we can leave the breakpoint in disabled state with attr->disabled == 0. We can safely enable the breakpoint back for both the fail and success paths by checking the bp->attr.disabled, which

[PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-27 Thread Jiri Olsa
Currently we enable the breakpoint back only if the breakpoint modification was successful. If it fails we can leave the breakpoint in disabled state with attr->disabled == 0. We can safely enable the breakpoint back for both the fail and success paths by checking the bp->attr.disabled, which

Re: [PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-17 Thread Frederic Weisbecker
On Fri, Aug 10, 2018 at 12:47:29PM +0200, Jiri Olsa wrote: > Currently we enable the breakpoint back only if the breakpoint > modification was successful. If it fails we can leave the > breakpoint in disabled state with attr->disabled == 0. > > We can safely enable the breakpoint back for both

Re: [PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-17 Thread Frederic Weisbecker
On Fri, Aug 10, 2018 at 12:47:29PM +0200, Jiri Olsa wrote: > Currently we enable the breakpoint back only if the breakpoint > modification was successful. If it fails we can leave the > breakpoint in disabled state with attr->disabled == 0. > > We can safely enable the breakpoint back for both

Re: [PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-14 Thread Oleg Nesterov
On 08/10, Jiri Olsa wrote: > > --- a/kernel/events/hw_breakpoint.c > +++ b/kernel/events/hw_breakpoint.c > @@ -523,13 +523,11 @@ int modify_user_hw_breakpoint(struct perf_event *bp, > struct perf_event_attr *att > perf_event_disable(bp); > > err =

Re: [PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-14 Thread Oleg Nesterov
On 08/10, Jiri Olsa wrote: > > --- a/kernel/events/hw_breakpoint.c > +++ b/kernel/events/hw_breakpoint.c > @@ -523,13 +523,11 @@ int modify_user_hw_breakpoint(struct perf_event *bp, > struct perf_event_attr *att > perf_event_disable(bp); > > err =

[PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-10 Thread Jiri Olsa
Currently we enable the breakpoint back only if the breakpoint modification was successful. If it fails we can leave the breakpoint in disabled state with attr->disabled == 0. We can safely enable the breakpoint back for both the fail and success paths by checking the bp->attr.disabled, which

[PATCH 4/5] perf/hw_breakpoint: Enable breakpoint in modify_user_hw_breakpoint

2018-08-10 Thread Jiri Olsa
Currently we enable the breakpoint back only if the breakpoint modification was successful. If it fails we can leave the breakpoint in disabled state with attr->disabled == 0. We can safely enable the breakpoint back for both the fail and success paths by checking the bp->attr.disabled, which