OSDN Git Service

perf trace beauty: Disable fd->pathname when close() not enabled
authorArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 16 Jul 2019 19:56:49 +0000 (16:56 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 29 Jul 2019 21:34:41 +0000 (18:34 -0300)
commit79d725cdf24dec7bfe7ad27b107f5cb06cd3785a
treef2e405f77d4372c2284a5e12907bb9e1c8ccdd28
parent1d86275225b4c9db3fb426e992886df5051f0047
perf trace beauty: Disable fd->pathname when close() not enabled

As we invalidate the fd->pathname table in the SCA_CLOSE_FD beautifier,
if we don't have it we may end up keeping an fd->pathname association
that then gets misprinted.

The previous behaviour continues when the close() syscall is enabled,
which may still be a a problem if we lose records (i.e. we may lose a
'close' record and then get that fd reused by socket()) but then the
tool will notify that records are being lost and the user will be warned
that some of the heuristics will fall apart.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Luis Cláudio Gonçalves <lclaudio@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: https://lkml.kernel.org/n/tip-b7t6h8sq9lebemvfy2zh3qq1@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-trace.c