John Dias 9b1cd81198
fs: Improve eventpoll logging to stop indicting timerfd
timerfd doesn't create any wakelocks; eventpoll can, and is creating the
wakelocks we see called "[timerfd]".  eventpoll creates two kinds of
wakelocks: a single top-level lock associated with the eventpoll fd
itself, and one additional lock for each fd it is polling that needs such
a lock (e.g. those using EPOLLWAKEUP).  Current code names the per-fd
locks using the undecorated names of the fds' associated files (hence
"[timerfd]"), and is naming the top-level lock after the PID of the caller
and the name of the file behind the first fd for which a per-fd lock is
created.  To make things clearer, the top-level lock is now named using
the caller PID and an "epollfd" designation, while the per-fd locks are
also named with the caller's PID (to associate them with the top-level
lock) and their respective fds' file names.

Port of fix already applied to previous 2 generations.  Note that this
set of changes does not fully solve the problem of eventpoll/timerfd
wakelock attribution to the original process, since most activity is
relayed through system_server, but it does at least ensure that different
eventpoll wakelocks - and their stats - are properly disambiguated.

Test: Ran on device and observed new wakelock naming in
/d/wakeup_sources and (file naming in) lsof output.
Bug: 116363986
Change-Id: I34bada5ddab04cf3830762c745f46bfcd1549cb8
Signed-off-by: John Dias <joaodias@google.com>
Signed-off-by: Kelly Rossmoyer <krossmo@google.com>
Signed-off-by: Miguel de Dios <migueldedios@google.com>
Signed-off-by: UtsavBalar1231 <utsavbalar1231@gmail.com>
Signed-off-by: Forenche <prahul2003@gmail.com>
2022-04-02 13:14:02 +05:30
..
2019-10-11 19:10:13 +02:00
2020-04-03 08:18:27 +02:00
2020-07-29 09:11:55 +02:00
2020-05-28 12:17:10 +02:00
2019-08-06 19:05:23 +02:00
2020-06-25 15:41:52 +02:00
2019-12-05 15:48:19 +01:00
2020-07-24 10:08:39 +02:00
2019-12-17 21:13:36 +01:00
2020-07-29 09:11:55 +02:00
2020-07-01 12:51:55 +02:00
2022-04-02 12:32:16 +05:30
2022-04-02 12:30:38 +05:30
2019-04-22 13:52:47 +05:30
2020-08-13 13:44:59 -07:00
2020-05-20 12:15:34 +02:00
2020-03-11 18:02:43 +01:00
2022-04-02 12:30:35 +05:30
2020-08-13 13:44:59 -07:00
2020-05-03 08:51:19 +02:00