fix: tracepoint: Optimize using static_call() (v5.10)
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 26 Oct 2020 21:09:05 +0000 (17:09 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 Nov 2020 20:39:31 +0000 (15:39 -0500)
commit0116245fd67c8cf8e63a63e6c964577f0d734e36
treee16616d4d1e5c9f8c752b86db0cbd30c7e7c7905
parent5e3317501af1b5d3474369f1ea8186ec3ebc628c
fix: tracepoint: Optimize using static_call() (v5.10)

See upstream commit :

  commit d25e37d89dd2f41d7acae0429039d2f0ae8b4a07
  Author: Steven Rostedt (VMware) <rostedt@goodmis.org>
  Date:   Tue Aug 18 15:57:52 2020 +0200

    tracepoint: Optimize using static_call()

    Currently the tracepoint site will iterate a vector and issue indirect
    calls to however many handlers are registered (ie. the vector is
    long).

    Using static_call() it is possible to optimize this for the common
    case of only having a single handler registered. In this case the
    static_call() can directly call this handler. Otherwise, if the vector
    is longer than 1, call a function that iterates the whole vector like
    the current code.

Change-Id: I739dd84d62cc1a821b8bd8acff74fa29aa25d22f
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/wrapper/tracepoint.h
src/lttng-statedump-impl.c
src/probes/lttng.c
tests/probes/lttng-test.c
This page took 0.027301 seconds and 4 git commands to generate.