Thread (9 messages) read the whole thread 9 messages, 3 authors, 2021-09-13

Re: [PATCH v7 bpf-next 3/3] selftests/bpf: add test for bpf_get_branch_snapshot

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-09-10 18:59:30
Also in: lkml

On Fri, Sep 10, 2021 at 11:33:52AM -0700, Song Liu wrote:
+	/* Given we stop LBR in software, we will waste a few entries.
+	 * But we should try to waste as few as possible entries. We are at
+	 * about 7 on x86_64 systems.
+	 * Add a check for < 10 so that we get heads-up when something
+	 * changes and wastes too many entries.
+	 */
+	ASSERT_LT(skel->bss->wasted_entries, 10, "check_wasted_entries");
It might be worth pointing out that you can easily bust this limit by
enabling all the various tracepoints that are still in that code, but
that that isn't a hard error since that's not the expected use case.

For example there's the wrmsr tracepoint that will inject 6 or so
branches on top of that you now have. And I also think there's a
tracepoint in local_irq_save() that can trigger.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help