------- Comment From kamale...@in.ibm.com 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 is : 133
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, 190 times
Count of cmdline_proc_show on CPU 31 is : 190
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, 0 times
Count of cmdline_proc_show on CPU 31 is : 0
Disabling function profiler

the configs are enabled in 2.04/2.10 kernel, can we please close this
FEAT.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1887986

Title:
  Enable FUNCTION_PROFILER kernel config option for ppc64le

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1887986/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to