linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sascha Hauer <sha@pengutronix.de>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@redhat.com>,
	kernel@pengutronix.de
Subject: Performance impact of CONFIG_FUNCTION_TRACER
Date: Tue, 5 Jul 2022 12:54:16 +0200	[thread overview]
Message-ID: <20220705105416.GE5208@pengutronix.de> (raw)

Hi,

I ran some lmbench subtests on a ARMv7 machine (NXP i.MX6q) with and
without CONFIG_FUNCTION_TRACER enabled (with CONFIG_DYNAMIC_FTRACE
enabled and no tracing active), see below. The Kconfig help text of this
option reads as:

> If it's runtime disabled (the bootup default), then the overhead of
> the instructions is very small and not measurable even in
> micro-benchmarks.

In my tests the overhead is small, but it surely exists and is
measurable at least on ARMv7 machines. Is this expected? Should the help
text be rephrased a little less optimistic?

lat_fs
======

CONFIG_FUNCTION_TRACER=y
------------------------

  _ file size
 /        _ repetitions
 |       /         _ created files per second
 |       |        /        _ deleted files per second
 |       |        |       /
0k      205     38325   70264
1k      123     21949   41495
4k      119     21632   42365
10k     84      14408   29439

CONFIG_FUNCTION_TRACER=n
------------------------

0k      198     39317   76241
1k      125     22397   42420
4k      125     22038   44144
10k     84      14965   30032

./scripts/do_ctx
================

Measures context switch time (in us?)

CONFIG_FUNCTION_TRACER=y
------------------------
"size=0k ovr=4.60
2 16.57
4 15.75
8 16.99
16 16.93
24 18.79
32 20.11
64 22.20
96 21.59

CONFIG_FUNCTION_TRACER=n
------------------------
"size=0k ovr=4.88
2 15.26
4 17.29
8 18.25
16 18.40
24 22.19
32 20.85
64 23.32
96 23.11
 
lat_pipe
========

I think it measures the time between sending and receiving data
through a pipe.

CONFIG_FUNCTION_TRACER=y
------------------------
Pipe latency: 44.7039 microseconds

CONFIG_FUNCTION_TRACER=n
------------------------
Pipe latency: 41.9876 microseconds

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2022-07-05 10:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-05 10:54 Sascha Hauer [this message]
2022-07-05 14:39 ` Performance impact of CONFIG_FUNCTION_TRACER Steven Rostedt
2022-07-05 21:59   ` Sascha Hauer
2022-07-05 22:27     ` Steven Rostedt
2022-07-14  9:10       ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220705105416.GE5208@pengutronix.de \
    --to=sha@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).