Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to tui for perf #12820

Open
wants to merge 3 commits into
base: 3.0-dev
Choose a base branch
from
Open

Enable to tui for perf #12820

wants to merge 3 commits into from

Conversation

rlmenge
Copy link
Contributor

@rlmenge rlmenge commented Mar 5, 2025

Merge Checklist

All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)

  • The toolchain has been rebuilt successfully (or no changes were made to it)
  • The toolchain/worker package manifests are up-to-date
  • Any updated packages successfully build (or no packages were changed)
  • Packages depending on static components modified in this PR (Golang, *-static subpackages, etc.) have had their Release tag incremented.
  • Package tests (%check section) have been verified with RUN_CHECK=y for existing SPEC files, or added to new SPEC files
  • All package sources are available
  • cgmanifest files are up-to-date and sorted (./cgmanifest.json, ./toolkit/scripts/toolchain/cgmanifest.json, .github/workflows/cgmanifest.json)
  • LICENSE-MAP files are up-to-date (./LICENSES-AND-NOTICES/SPECS/data/licenses.json, ./LICENSES-AND-NOTICES/SPECS/LICENSES-MAP.md, ./LICENSES-AND-NOTICES/SPECS/LICENSE-EXCEPTIONS.PHOTON)
  • All source files have up-to-date hashes in the *.signatures.json files
  • sudo make go-tidy-all and sudo make go-test-coverage pass
  • Documentation has been updated to match any changes to the build system
  • Ready to merge

Summary

Adding slang-devel to kernel spec, enabling perf tui

Perf's Makefile has a slang-devel check, which enables tui when slang is detected. (https://github.com/microsoft/CBL-Mariner-Linux-Kernel/blob/rolling-lts/mariner-3/6.6.78.1/tools/perf/Makefile.config#L765). Adding this package at built time will allow
perf --tui support

Change Log
  • Add slang-devel as a BR to enable tui for perf
Does this affect the toolchain?

YES

Associated issues
Test Methodology

Buddy Build
Validate fix

sudo tdnf install -y  kernel-tools-6.6.78.1-2.azl3.x86_64.rpm
# May need sudo sysctl -w kernel.perf_event_paranoid=-1
perf record -e cycles -a -- ls
# perf report will default to tui if available otherwise will print data
perf report

Example without tui
image
Example of tui:
image

Smoke Tests
AMD

*** Smoke Testing Kernel 6.6.78.1-2.azl3 (est. < 1 min) ***
PASS: Kernel version matches the running kernel version.
PASS: eth0 interface is up.
PASS: iptables service is running.
Boot times:
Startup finished in 1.884s (kernel) + 1.347s (initrd) + 8.864s (userspace) = 12.095s 
graphical.target reached after 8.465s in userspace.
Kernel size:
-rw------- 1 root root 15044608 Mar  5 02:13 /boot/vmlinuz-6.6.78.1-2.azl3
30916	/lib/modules/6.6.78.1-2.azl3
kernel memory:
MemTotal:       32874296 kB
MemFree:        32515432 kB
MemAvailable:   32338676 kB
Total memory:
               total        used        free      shared  buff/cache   available
Mem:           32103         523       31753           8         123       31580
Swap:              0           0           0

ARM

*** Smoke Testing Kernel 6.6.78.1-2.azl3 (est. < 1 min) ***
PASS: Kernel version matches the running kernel version.
PASS: eth0 interface is up.
PASS: iptables service is running.
Boot times:
Startup finished in 2.225s (kernel) + 1.410s (initrd) + 5.308s (userspace) = 8.944s 
graphical.target reached after 5.051s in userspace.
Kernel size:
-rw------- 1 root root 48718336 Mar  5 02:48 /boot/vmlinuz-6.6.78.1-2.azl3
49204	/lib/modules/6.6.78.1-2.azl3
kernel memory:
MemTotal:       395447188 kB
MemFree:        392640772 kB
MemAvailable:   391088544 kB
Total memory:
               total        used        free      shared  buff/cache   available
Mem:          386178        4256      383438           1         172      381922
Swap:              0           0           0

AZaugg and others added 3 commits March 5, 2025 01:36
Perf's Makefile has a slang-devel check, which enables tui when
slang is detected. Adding this package at built time will allow
perf --tui support
@microsoft-github-policy-service microsoft-github-policy-service bot added Packaging 3.0-dev PRs Destined for AzureLinux 3.0 labels Mar 5, 2025
@AZaugg
Copy link
Contributor

AZaugg commented Mar 5, 2025

Looks good!

@rlmenge rlmenge changed the title [WIP] Enable to tui for perf Enable to tui for perf Mar 5, 2025
@rlmenge rlmenge marked this pull request as ready for review March 5, 2025 18:07
@rlmenge rlmenge requested a review from a team as a code owner March 5, 2025 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0-dev PRs Destined for AzureLinux 3.0 Packaging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants