Messages in this thread | | | From | Milind Chabbi <> | Date | Mon, 13 Nov 2017 00:02:56 -0800 | Subject | Re: [PATCH] perf/core: fast breakpoint modification via _IOC_MODIFY_BREAKPOINT |
| |
SNIP
On Sun, Nov 12, 2017 at 11:46 PM, Jiri Olsa <jolsa@redhat.com> wrote:
> but you closed fd4 before openning fd5..?
Yes, that is correct. I closed fd4. The reason is by closing fd4, we are having a total of 3 hardware breakpoints active, but we are making the software counting in the kernel think that four TYPE_DATA breakpoints active. The counting should have disallowed us from creating fd5 as per the following logic in the kernel:
static int __reserve_bp_slot(struct perf_event *bp)
{ ....
/* Flexible counters need to keep at least one slot */ if (slots.pinned + (!!slots.flexible) > nr_slots[type]) return -ENOSPC; .... }
| |