RFC i2c counters as sysfs attributes
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 RFC Latest posting 2/21 patch 0 repliesNew
- v5 RFC posting 1/21 patch 0 repliesSuperseded
- v4 RFC1 patch 3 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 RFC | 3 patches | 1 reply | Superseded | |
| v2 RFC | 3 patches | 6 replies | Superseded | |
| v1 RFC | 2 patches | 1 reply | Superseded |
Patches in v5 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/1 | i2c debug counters as sysfs attributesdrivers/ drivers/ include/ | +374 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.
Cover letter [RFC Patch v5 Resend 0/1] i2c counters as sysfs attributes
Hello, linux-i2c,
We would like to ping in a friendly way and see if there are any comments on the i2c counters as sysfs attributes.
This change renames the I2C debug counters as previously, and makes them available to i2c_adapter's and i2c_client's:
- bus_errors
- transfers (only applicable to i2c_adapter)
- messages (only applicable to i2c_client)
- nacks
- timeouts
- recovery_successes (only applicable to i2c_adapter)
- recovery_failures (only applicable to i2c_adapter)
This patchset is the same as the last one, except that we are using a new method to verify the results in the counter for i2c_adapters:
We use the Perfetto profiler+visualizer to grab the I2C kernel tracing events on a BMC with many I2C devices, and compared the I2C counters before and after the tracing process.
We needed to add a change for Perfetto in order to view the I2C events in the UI. The Perfetto change is located in
https://android-review.googlesource.com/c/platform/external/perfetto/+/2145699
and it currently shows the outermost I2C ID that appears in an I2C transaction.
We inspected the counts in the Perfetto trace by executing the "SELECT count(name), name FROM slices WHERE name LIKE "%i2c%" GROUP BY name;" SQLite query.
It turns out the increment in the counters in the counters in sysfs and in the Perfetto trace very closely match each other; the differences were caused by the time differences between the moments the tracing started/ended and the I2C counters are obtained.
We would greatly appreciate any comments on this change.
Thanks!
Sui Chen (1):
i2c debug counters as sysfs attributes
drivers/i2c/i2c-core-base.c | 240 +++++++++++++++++++++++++++++++++++- drivers/i2c/i2c-dev.c | 94 ++++++++++++++ include/linux/i2c.h | 41 ++++++ 3 files changed, 374 insertions(+), 1 deletion(-)
Signature · 1 line
2.37.1.559.g78731f0fdb-goog