Fix: cache the result of getpid() internally 36/221436/1
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 2 Mar 2018 22:36:26 +0000 (17:36 -0500)
committerDongkyun Son <dongkyun.s@samsung.com>
Thu, 2 Jan 2020 09:13:18 +0000 (18:13 +0900)
commit294ea1b31e226bddf8a16c8a5063a2c087d035b7
tree317111a4fe7544e0779107f109d1743a1f1fcfd9
parente8e42d85da1edca3c5466e0d7f290873fd1ac5c9
Fix: cache the result of getpid() internally

On Linux we called getpid() directly on each tracepoint and relied on
the glibc pid cache. However, in glibc 2.25, released on 2017-02-05, the
pid cache was removed which results in a getpid syscall on each event
when the vpid context is enabled.

Remove the Linux specific case and use our internal cache all the time.

Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
(cherry picked from commit 6d9b54d845b08d54d3f483f1130b499516588db3)

Change-Id: Ide9a7f3c99061e3b3d9f68cec86fc117dc684be7
liblttng-ust/lttng-context-vpid.c