New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 852869 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

bootstat: dead code, via "/sys/kernel/debug/bootstage/mark"

Project Member Reported by briannorris@chromium.org, Jun 14 2018

Issue description

Micah noticed this debugfs file accessed here ( bug 804941 ):

https://cs.corp.google.com/chromeos_public/src/platform2/bootstat/bootstat_log.c?rcl=d43e1af7e8b2a442cb976bef467103c4d65b16e1&l=134

AFAICT, there are no kernels where this file should have ever existed. And it definitely doesn't exist today. Is this just dead code, that always fails the open()?

Ancient context:  bug 202276  + https://chromium-review.googlesource.com/c/chromiumos/platform/bootstat/+/6598 (ooh, 4 digits!)
 
Components: -OS>Kernel OS>Systems
Owner: ----
Status: Available (was: Assigned)
> AFAICT, there are no kernels where this file should have
> ever existed. And it definitely doesn't exist today. Is this
> just dead code, that always fails the open()?

At the time that the code was created, the existing kernels did
provide the file.

I wouldn't be surprised that newer kernels didn't maintain that,
and I kind of think that most of the hardware that had the kernel
support is either EOU, or has had a kernel upgrade and lost the
support.

Dropping ownership:  I'm not responsible for this code anymore.

Owner: briannorris@chromium.org
Status: Started (was: Available)
> At the time that the code was created, the existing kernels did
> provide the file.

Ohh....I've never looked at a chromeos-2.x.y branch before, but apparently we had this back in 2.6.38:

https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4892

It didn't survive beyond that kernel (and was never upstreamed).

Methinks this has been dead long enough that it can't possibly be important. I'll see about extricating this part.

> Dropping ownership:  I'm not responsible for this code anymore.

https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1101481
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 16 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform2/+/659b8223ec5dbab70cd46773bb02a6b9dc90f2e9

commit 659b8223ec5dbab70cd46773bb02a6b9dc90f2e9
Author: Brian Norris <briannorris@chromium.org>
Date: Sat Jun 16 01:51:08 2018

bootstat: stop writing to non-existent debugfs file

/sys/kernel/debug/bootstage/mark was introduced way back in
chromeos-2.6.38:

https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/4892

This never was upstreamed, and it didn't get ported to newer kernels.
Thus, it has been dead for a very long time.

Additionally, I can't find anyone who reads the companion file
"/sys/kernel/debug/bootstage/report", so I don't think this code would
really do anything anyway. Users like the platform_BootPerf autotest
only look at the files we stash in /tmp/ anyway (see append_logdata()),
which mostly duplicate this info, except for the few in-kernel
stages that we were trying to track -- but if we wanted to track this
stuff, we'd probably do it differently today anyway.

Remove the dead code, so we don't continue trying to drag it along
(e.g.,  crbug.com/804941 ).

BUG= chromium:852869 
TEST=precq; manual tests

Change-Id: I129b167f6065ba1b1fd937d8425cf42a3a80fedb
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1101704
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Reviewed-by: Chung-yih Wang <cywang@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/659b8223ec5dbab70cd46773bb02a6b9dc90f2e9/bootstat/bootstat_log.c

Status: Fixed (was: Started)

Sign in to add a comment