Skip to content

Conversation

@Tejas3772
Copy link

Implemented a new Avocado testcase to validate perf report options. The testcase runs perf report with both documented and less frequently used/unused options, capturing output and errors for each.

@Tejas3772
Copy link
Author

report.log

@narasimhan-v
Copy link
Member

@Tejas3772 Can you please attach debug.log

@Naresh-ibm Naresh-ibm self-assigned this Nov 13, 2025
@PraveenPenguin
Copy link
Member

@Tejas3772 please address the review comment from @Naresh-ibm and wrap all the commits in logical commits (here, i feel it is one)

@Tejas3772 Tejas3772 force-pushed the report branch 3 times, most recently from 7621c2e to a68e030 Compare November 17, 2025 17:17
@Tejas3772
Copy link
Author

Tejas3772 commented Nov 17, 2025

report.log

excuse the Fail at -v and --verbose, fails at new 9.8 kernel manually with certain record options with seg fault

@Tejas3772
Copy link
Author

Tejas3772 commented Nov 17, 2025

noyamlreport.log

Made code changes to run without yaml as well

@Tejas3772 Tejas3772 force-pushed the report branch 4 times, most recently from aff343b to 386d45e Compare November 19, 2025 11:02
@disgoel
Copy link
Contributor

disgoel commented Nov 19, 2025

your code is considering --branch-filter also as a report option to test which is not true and fails with 129 exit code. This should fail, instead of adding in unknown options list. Please fix the logic to parse report options.

same with --data also

[stdlog] 2025-11-18 03:58:47,017 avocado.utils.process process          L0475 DEBUG| [stdout]        -b, --branch-stack
[stdlog] 2025-11-18 03:58:47,018 avocado.utils.process process          L0475 DEBUG| [stdout]            Use the addresses of sampled taken branches instead of the instruction address to build the histograms. To generate meaningful
[stdlog] 2025-11-18 03:58:47,018 avocado.utils.process process          L0475 DEBUG| [stdout]            output, the perf.data file must have been obtained using perf record -b or perf record --branch-filter xxx where xxx is a
[stdlog] 2025-11-18 03:58:47,018 avocado.utils.process process          L0475 DEBUG| [stdout]            branch filter option. perf report is able to auto-detect whether a perf.data file contains branch stacks and it will
[stdlog] 2025-11-18 03:58:47,018 avocado.utils.process process          L0475 DEBUG| [stdout]            automatically switch to the branch view mode, unless --no-branch-stack is used.
[stdlog] 2025-11-18 03:58:47,036 avocado.utils.process process          L0475 DEBUG| [stdout]        --mmaps
[stdlog] 2025-11-18 03:58:47,036 avocado.utils.process process          L0475 DEBUG| [stdout]            Show --tasks output plus mmap information in a format similar to /proc/<PID>/maps.
[stdlog] 2025-11-18 03:58:47,036 avocado.utils.process process          L0475 DEBUG| [stdout] 
[stdlog] 2025-11-18 03:58:47,036 avocado.utils.process process          L0475 DEBUG| [stdout]                Please note that not all mmaps are stored, options affecting which ones
[stdlog] 2025-11-18 03:58:47,036 avocado.utils.process process          L0475 DEBUG| [stdout]                are include 'perf record --data', for instance.

@Tejas3772 Tejas3772 force-pushed the report branch 3 times, most recently from eda3bef to e80ddc8 Compare November 19, 2025 12:36
…used options for perf report

Implemented a new Avocado testcase to validate perf report options.
The testcase runs perf report with both documented and less frequently
used/unused options, capturing output and errors for each.

Signed-off-by: Tejas Manhas <[email protected]>
@Tejas3772
Copy link
Author

Actually it happened because while picking, description record options got picked, fixed that, this logic is intact as that options unknown for report so it will give unknown option only. Fixed at the correct function.

@@ -0,0 +1,56 @@
--prefix: "/home/user/src"
--prefix - strip: "1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix this also

pass
self.buldir = smg.get_source(
src_name, self.workdir, build_option='-bp')
self.buldir = os.path.join(self.buldir, os.listdir(self.buldir)[0])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add logic to handle this error
FileNotFoundError: [Errno 2] No such file or directory: ''

Comment on lines +80 to +81
self.perf_src_options = self.get_src_options()
self.log.info(f"Perf report source options: {self.perf_src_options}")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you fix parsing logic, some are not report options
[stdlog] 2025-11-20 23:50:47,694 avocado.test perf_report L0074 INFO | Perf report source options: {'-639', '--itrace', '-2025-11-20T23', '-t', '--dump', '-D', '-a2086bd', '-clock', '-fvt-wrapper', '-o-', '-q', '-i', '-s', '--task', '-e', '--header', '--percent-limit', '-5', '--stdio', '-perf_report', '-g', '-n', '-results', '-E', '-i-', '-A', '--header-only', '-F', '-o', '--stitch-lbr'}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants