Enable FUNCTION_PROFILER kernel config option for ppc64le

Bug #1887986 reported by bugproxy
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Fix Released
Medium
Ubuntu on IBM Power Systems Bug Triage
linux (Ubuntu)
Fix Released
Undecided
Canonical Kernel Team
Focal
Fix Released
Undecided
Canonical Kernel Team
Groovy
Fix Released
Undecided
Canonical Kernel Team

Bug Description

Please enable CONFIG_FUNCTION_PROFILER config option for ppc64le kernel. This option enables the ftrace function profiling in the kernel, it helps in getting the function profiling information such as hit count, time spend and other profiling details.

Enabling this kernel config option should not have any performance impact unless the function profiling is enabled.

bugproxy (bugproxy)
tags: added: architecture-ppc64le bugnameltc-185631 severity-medium targetmilestone-inin2004
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → linux (Ubuntu)
Changed in ubuntu-power-systems:
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
importance: Undecided → Medium
Frank Heimes (fheimes)
Changed in ubuntu-power-systems:
assignee: Canonical Kernel Team (canonical-kernel-team) → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
Changed in linux (Ubuntu Focal):
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
Changed in linux (Ubuntu Groovy):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Canonical Kernel Team (canonical-kernel-team)
Revision history for this message
Frank Heimes (fheimes) wrote :

Request by IBM was to get that done for the 20.04.2 timeframe.

Revision history for this message
Frank Heimes (fheimes) wrote :

Starting to work on this SRU I figures out that this kernel config option is already enabled.
I checked the config file that is created at kernel build time as well as the master-next trees of focal and groovy - and CONFIG_FUNCTION_PROFILER is enabled for all architectures, incl. ppc64el:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
$ uname -r
5.4.0-44-generic
$ grep CONFIG_FUNCTION_PROFILER /boot/config-$(uname -r)
CONFIG_FUNCTION_PROFILER=y

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Groovy Gorilla (development branch)
Release: 20.10
Codename: groovy
$ uname -r
5.4.0-42-generic
$ grep CONFIG_FUNCTION_PROFILER /boot/config-$(uname -r)
CONFIG_FUNCTION_PROFILER=y

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Groovy Gorilla (development branch)
Release: 20.10
Codename: groovy
$ uname -r
5.8.0-16-generic
<proposed kernel>
$ grep CONFIG_FUNCTION_PROFILER /boot/config-$(uname -r)
CONFIG_FUNCTION_PROFILER=y

user@box:~/ubuntu-focal-master-next/debian.master/config$ grep -R CONFIG_FUNCTION_PROFILER *
annotations:CONFIG_FUNCTION_PROFILER policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'i386': 'y', 'ppc64el': 'y', 's390x': 'y'}>
config.common.ubuntu:CONFIG_FUNCTION_PROFILER=y

user@box:~/ubuntu-groovy-master-next/debian.master/config$ grep -R CONFIG_FUNCTION_PROFILER *
annotations:CONFIG_FUNCTION_PROFILER policy<{'amd64': 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}>
config.common.ubuntu:CONFIG_FUNCTION_PROFILER=y

Is CONFIG_FUNCTION_PROFILER the only option you were looking for, or is/are there other options needed or is it not working for you (even if set)?
Otherwise I would say there is nothing to do, since it's already configured like requested.

Changed in ubuntu-power-systems:
status: New → Incomplete
Changed in linux (Ubuntu Focal):
status: New → Incomplete
Changed in linux (Ubuntu Groovy):
status: New → Incomplete
Revision history for this message
bugproxy (bugproxy) wrote : Comment bridged from LTC Bugzilla
Download full text (3.7 KiB)

------- Comment From <email address hidden> 2020-08-27 02:48 EDT-------
(In reply to comment #8)
> Starting to work on this SRU I figures out that this kernel config option is
> already enabled.
> I checked the config file that is created at kernel build time as well as
> the master-next trees of focal and groovy - and CONFIG_FUNCTION_PROFILER is
> enabled for all architectures, incl. ppc64el:
>
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu 20.04.1 LTS
> Release: 20.04
> Codename: focal
> $ uname -r
> 5.4.0-44-generic
> $ grep CONFIG_FUNCTION_PROFILER /boot/config-$(uname -r)
> CONFIG_FUNCTION_PROFILER=y
>
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu Groovy Gorilla (development branch)
> Release: 20.10
> Codename: groovy
> $ uname -r
> 5.4.0-42-generic
> $ grep CONFIG_FUNCTION_PROFILER /boot/config-$(uname -r)
> CONFIG_FUNCTION_PROFILER=y
>
> $ lsb_release -a
> No LSB modules are available.
> Distributor ID: Ubuntu
> Description: Ubuntu Groovy Gorilla (development branch)
> Release: 20.10
> Codename: groovy
> $ uname -r
> 5.8.0-16-generic
> <proposed kernel>
> $ grep CONFIG_FUNCTION_PROFILER /boot/config-$(uname -r)
> CONFIG_FUNCTION_PROFILER=y
>
> user@box:~/ubuntu-focal-master-next/debian.master/config$ grep -R
> CONFIG_FUNCTION_PROFILER *
> annotations:CONFIG_FUNCTION_PROFILER policy<{'amd64':
> 'y', 'arm64': 'y', 'armhf': 'y', 'i386': 'y', 'ppc64el': 'y', 's390x': 'y'}>
> config.common.ubuntu:CONFIG_FUNCTION_PROFILER=y
>
> user@box:~/ubuntu-groovy-master-next/debian.master/config$ grep -R
> CONFIG_FUNCTION_PROFILER *
> annotations:CONFIG_FUNCTION_PROFILER policy<{'amd64':
> 'y', 'arm64': 'y', 'armhf': 'y', 'ppc64el': 'y', 's390x': 'y'}>
> config.common.ubuntu:CONFIG_FUNCTION_PROFILER=y
>
> Is CONFIG_FUNCTION_PROFILER the only option you were looking for, or is/are
> there other options needed or is it not working for you (even if set)?
> Otherwise I would say there is nothing to do, since it's already configured
> like requested.

Thank you for confirming, sorry my bad for not checking in 20.04 kernel. I verified it on 5.4.0-42-generic (20.04.1) kernel. The test is a simple script, which takes a function to be profiled and a CPU number to check for profiled function count. The script calls a program, that calls the kernel function to be profiled, and in this case its "cat /proc/cmdline". The number of times the program gets called is random.

With every instance of the test script the profile count is reset to 0 by disabling/enabling the function_profiler, after calling program a.k.a. "cat /proc/cmdline" for random N times, it displays the profile count on the CPU passed to the script.

# ./test.sh cmdline_proc_show 31
Enabling/resetting function profiler
Count of cmdline_proc_show on CPU 31 is : 0
Calling cmdline_proc_show, 48 times
Count of cmdline_proc_show on CPU 31 is : 48
Disabling function profiler

# ./test.sh cmdline_proc_show 31
Enabling/resetting function profiler
Count of cmdline_proc_show on CPU 31 is : 0
Calling cmdline_proc_show, 133 times
Count of cmdline_proc_show on CPU 31...

Read more...

Revision history for this message
Frank Heimes (fheimes) wrote :

Okay, closing this ticket (according to comment #3) as Fix Released.

Changed in linux (Ubuntu Groovy):
status: Incomplete → Fix Released
Changed in linux (Ubuntu Focal):
status: Incomplete → Fix Released
Changed in ubuntu-power-systems:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.