flt.lttng-utils.debug-info: fd-cache: log to `debug` severity on stat() error
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 8 May 2019 15:43:02 +0000 (11:43 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 8 May 2019 18:11:25 +0000 (14:11 -0400)
commit093946c02b16a1c7d9995a5bca1a54c101e0b379
treeb9abcb64c6f4b7e99f1db5dd3857553c894634ca
parent9eb4d33db0d32e46fc1554feb448fac640246662
flt.lttng-utils.debug-info: fd-cache: log to `debug` severity on stat() error

Issue
=====
A `debug-info` component tries to open multiple files in its search to
find the debugging information necessary to resolve the addresses
contained in the trace.

Early in the `bt_fd_cache_get_handle()` function, a `stat()`
is done on the path to get the inode number and device number. This
`stat()` returns an error if the file is absent. Currently, in those
cases, an message is logged at the `error` severity level (BT_LOGE_*)
resulting in the printing of an error message. Since multiple files are
tired until the right one is found (if any), the user can see multiple
error messages even if the right file may be found later.

This is undesirable because it mislead the user into thinking that an
error occurred when in fact it's completely normal.

Solution
========
Log the failure of this `stat()` call to the `debug` severity level.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Change-Id: If81f4333374e6ee95b4dea07924c3d37f0e3b652
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1276
Reviewed-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
fd-cache/fd-cache.c
This page took 0.025655 seconds and 4 git commands to generate.