Re: [PATCH v5 v5 1/9] perf c2c: extract shared data structures into c2c.h
[email protected] Thu, 30 Jul 2026 09:13:00 +0000
| Newsgroups | org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The header `c2c.h` omits the `#else` dummy inline stub for `perf_c2c__browse_cacheline` when `HAVE_SLANG_SUPPORT` is not defined. -- --- Patch [1]: [PATCH v5 v5 1/9] perf c2c: extract shared data structures into c2c.h --- commit 36546c8a38f921a241992fc1080e419739637db8 Author: Jiebin Sun <[email protected]> perf c2c: extract shared data structures into c2c.h Move c2c_hists, compute_stats, c2c_hist_entry, perf_c2c, and the shared column-formatting structures and macros from builtin-c2c.c into a new shared header c2c.h. This allows the upcoming function view browser (c2c-function.c) to reuse these types and formatting definitions. > diff --git a/tools/perf/c2c.h b/tools/perf/c2c.h > new file mode 100644 > index 0000000000000..ab7adb85d9c06 > --- /dev/null > +++ b/tools/perf/c2c.h [ ... ] > +/* > + * The TUI browsers are only built with SLANG support. Their sole callers > + * live inside HAVE_SLANG_SUPPORT-guarded code in builtin-c2c.c (stdio mode > + * forces use_browser=0), so no #else stub is needed -- matching the rest of > + * perf's TUI entry points. > + */ > +#ifdef HAVE_SLANG_SUPPORT > +int perf_c2c__browse_cacheline(struct hist_entry *he); > +#endif [Severity: Low] Should there be an #else fallback stub provided for perf_c2c__browse_cacheline() in c2c.h? Even though the comment states current callers are guarded, the subsystem guidelines require header files to provide compatible dummy inline stubs when a feature define like HAVE_SLANG_SUPPORT is absent. > + > +#endif /* _PERF_C2C_H_ */ -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1