Em Tue, 25 Oct 2016 17:14:29 -0600 Jonathan Corbet <corbet@xxxxxxx> escreveu: > On Mon, 24 Oct 2016 09:00:14 -0200 > Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> wrote: > > > Convert it to ReST markup and add it to the user book: > > > > - Add a title to the document; > > - touch spaces/new lines to fix Sphinx format; > > - use ``foo`` for commands; > > - use quote blocks where needed; > > - add it to the user book; > > I have to wonder about this one too. It hasn't been touched for over > 11 years, talks about 2.6, the last oprofile release was over a year ago, > and don't we all just use perf for this stuff anymore? Can anybody think > of a reason to keep this document? Good point. Some support people I know from a previous employer love (or used to love?) oprofile for profiling. I guess LTS people prefer oprofile because they can use the same tool on multiple releases of the distros they maintain. Hmm... a quick grep on OPROFILE at the defconfigs shows 77 configs with it enabled: $ git grep OPROFILE |grep configs|grep =y|wc -l 40 $ git grep OPROFILE |grep configs|grep =m|wc -l 37 Perhaps we could add a notice there explaining that perf is preferred and add some documentation before the oprofile chapter, perhaps with a pointer to: https://perf.wiki.kernel.org/index.php/Tutorial Something like the enclosed patch. Thanks, Mauro [PATCH] basic-profiling.rst: update it to point to perf On a quick test, readprofile require access to /proc/profile, with is not available anymore, at least on Fedora 24 Kernel. On the other hand, perf is not even mentioned. So, update the basic-profiling.rst to recommend the usage of perf and remove readprofile. Signed-off-by: Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxxxxx> diff --git a/Documentation/admin-guide/basic-profiling.rst b/Documentation/admin-guide/basic-profiling.rst index 72babc71b771..fe12bfa19de0 100644 --- a/Documentation/admin-guide/basic-profiling.rst +++ b/Documentation/admin-guide/basic-profiling.rst @@ -1,7 +1,6 @@ Basic kernel profiling ====================== - These instructions are deliberately very basic. If you want something clever, go read the real docs ;-) @@ -17,30 +16,22 @@ It is probably easiest to use ``make install`` for linux and hack ``/sbin/installkernel`` to copy ``vmlinux`` to ``/boot``, in addition to ``vmlinuz``, ``config``, ``System.map``, which are usually installed by default. -Readprofile ------------ - -A recent ``readprofile`` command is needed for 2.6, such as found in util-linux -2.12a, which can be downloaded from: - - http://www.kernel.org/pub/linux/utils/util-linux/ +Perf +---- -Most distributions will ship it already. +Nowadays, the best profiling tool is perf. -Add ``profile=2`` to the kernel command line. +Please read the perf tutorial for more information: -Some ``readprofile`` commands:: + https://perf.wiki.kernel.org/index.php/Tutorial - clear readprofile -r - <test> - dump output readprofile -m /boot/System.map > captured_profile Oprofile -------- -Get the source (see Changes for required version) from -http://oprofile.sourceforge.net/ and add ``idle=poll`` to the kernel command -line. +Get the source (see :ref:`Documentation/process/changes.rst <changes>` for +required version) from http://oprofile.sourceforge.net/ and add +``idle=poll`` to the kernel command line. Configure with ``CONFIG_PROFILING=y`` and ``CONFIG_OPROFILE=y`` & reboot on new kernel:: -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html