diff options
| author | Sean Young <sean@mess.org> | 2026-09-01 14:22:24 +0100 |
|---|---|---|
| committer | Sean Young <sean@mess.org> | 2026-09-22 14:50:17 +0100 |
| commit | eac8eed5f46dcb21124bd21ced2af58e2b4d4f62 (patch) | |
| tree | 591916e2863a31b7aa581a3db683e04323f0196b /tools/perf/scripts/python/bin/stackcollapse-report | |
| parent | ae6cfbad7ca346b78f4cdac38438bbfaed8c18a0 (diff) | |
media: rc: Use binary search for adding or updating a scancode
We can have up to 1024 scancodes entries which are always sorted, so make
this a little faster.
We need to either get an scancode entry, or find the insertion point
in the sorted array if no existing entry was found. The bsearch() function
cannot do this as it runs NULL is no matching entry is found. Therefore,
we provide an open coded binary search.
Signed-off-by: Sean Young <sean@mess.org>
Acked-by: Hans Verkuil <hverkuil+cisco@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/bin/stackcollapse-report')
0 files changed, 0 insertions, 0 deletions
