linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
Cc: penberg@cs.helsinki.fi, cl@linux-foundation.org,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 1/4] kmemtrace: Core implementation.
Date: Thu, 17 Jul 2008 14:34:34 -0700	[thread overview]
Message-ID: <20080717143434.79b33fe9.rdunlap@xenotime.net> (raw)
In-Reply-To: <4472a3f883b0d9026bb2d8c490233b3eadf9b55e.1216255035.git.eduard.munteanu@linux360.ro>

On Thu, 17 Jul 2008 03:46:45 +0300 Eduard - Gabriel Munteanu wrote:

> kmemtrace provides tracing for slab allocator functions, such as kmalloc,
> kfree, kmem_cache_alloc, kmem_cache_free etc.. Collected data is then fed
> to the userspace application in order to analyse allocation hotspots,
> internal fragmentation and so on, making it possible to see how well an
> allocator performs, as well as debug and profile kernel code.
> 
> Signed-off-by: Eduard - Gabriel Munteanu <eduard.munteanu@linux360.ro>
> ---
>  Documentation/kernel-parameters.txt |    6 +
>  Documentation/vm/kmemtrace.txt      |   96 ++++++++++++++++
>  MAINTAINERS                         |    6 +
>  include/linux/kmemtrace.h           |  110 ++++++++++++++++++
>  init/main.c                         |    2 +
>  lib/Kconfig.debug                   |    4 +
>  mm/Makefile                         |    2 +-
>  mm/kmemtrace.c                      |  208 +++++++++++++++++++++++++++++++++++
>  8 files changed, 433 insertions(+), 1 deletions(-)
>  create mode 100644 Documentation/vm/kmemtrace.txt
>  create mode 100644 include/linux/kmemtrace.h
>  create mode 100644 mm/kmemtrace.c
> 
> diff --git a/Documentation/vm/kmemtrace.txt b/Documentation/vm/kmemtrace.txt
> new file mode 100644
> index 0000000..1147ecb
> --- /dev/null
> +++ b/Documentation/vm/kmemtrace.txt

> +II. Quick usage guide
> +=====================
> +
> +1) Get a kernel that supports kmemtrace and build it accordingly (i.e. enable
> +CONFIG_KMEMTRACE).
> +
> +2) Get the userspace tool and build it:
> +$ git-clone git://repo.or.cz/kmemtrace-user.git		# current repository
> +$ cd kmemtrace-user/
> +$ autoreconf
> +$ ./configure		# Supply KERNEL_SOURCES=/path/to/sources/ if you're
> +			# _not_ running this on a kmemtrace-enabled kernel.
> +$ make
> +
> +3) Boot the kmemtrace-enabled kernel if you haven't, preferably in the
> +'single' runlevel (so that relay buffers don't fill up easily), and run
> +kmemtrace:
> +# '$' does not mean user, but root here.
> +$ mount -t debugfs none /debug

Please mount at /sys/kernel/debug, i.e., the expected debugfs mount point.

> +$ mount -t proc none /proc
> +$ cd path/to/kmemtrace-user/
> +$ ./kmemtraced
> +Wait a bit, then stop it with CTRL+C.
> +$ cat /debug/kmemtrace/total_overruns	# Check if we didn't overrun, should
> +					# be zero.
> +$ (Optionally) [Run kmemtrace_check separately on each cpu[0-9]*.out file to
> +		check its correctness]
> +$ ./kmemtrace-report
> +
> +Now you should have a nice and short summary of how the allocator performs.


Otherwise looks nice.  Thanks.

---
~Randy
Linux Plumbers Conference, 17-19 September 2008, Portland, Oregon USA
http://linuxplumbersconf.org/

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2008-07-17 21:34 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17  0:46 [RFC PATCH 0/4] kmemtrace RFC (resubmit 1) Eduard - Gabriel Munteanu
2008-07-17  0:46 ` [RFC PATCH 1/4] kmemtrace: Core implementation Eduard - Gabriel Munteanu
2008-07-17  0:46   ` [RFC PATCH 2/4] kmemtrace: SLAB hooks Eduard - Gabriel Munteanu
2008-07-17  0:46     ` [RFC PATCH 3/4] kmemtrace: SLUB hooks Eduard - Gabriel Munteanu
2008-07-17  0:46       ` [RFC PATCH 4/4] kmemtrace: SLOB hooks Eduard - Gabriel Munteanu
2008-07-17  7:43         ` Pekka Enberg
2008-07-17 15:46           ` Matt Mackall
2008-07-17  7:46       ` [RFC PATCH 3/4] kmemtrace: SLUB hooks Pekka Enberg
2008-07-17 18:06         ` Eduard - Gabriel Munteanu
2008-07-17  7:38     ` [RFC PATCH 2/4] kmemtrace: SLAB hooks Pekka Enberg
2008-07-17  8:01   ` [RFC PATCH 1/4] kmemtrace: Core implementation Pekka Enberg
2008-07-17 18:32     ` Eduard - Gabriel Munteanu
2008-07-18  8:48       ` Pekka J Enberg
2008-07-18 10:13         ` Eduard - Gabriel Munteanu
2008-07-18 14:38           ` Pekka Enberg
2008-07-18 19:40             ` Eduard - Gabriel Munteanu
2008-07-18 20:07               ` Matt Mackall
2008-07-17 21:34   ` Randy Dunlap [this message]
2008-07-17 23:49     ` Eduard - Gabriel Munteanu
2008-07-22 18:31 [RFC PATCH 0/4] kmemtrace RFC (resend 2) Eduard - Gabriel Munteanu
2008-07-22 18:31 ` [RFC PATCH 1/4] kmemtrace: Core implementation Eduard - Gabriel Munteanu
2008-07-22 21:28   ` Frank Ch. Eigler
2008-07-23  0:50     ` Eduard - Gabriel Munteanu
2008-07-23  0:55       ` Eduard - Gabriel Munteanu
2008-07-23  1:26       ` Frank Ch. Eigler
2008-07-22 18:36 [RFC PATCH 0/4] kmemtrace RFC (resend 2, fixed wrong Cc) Eduard - Gabriel Munteanu
2008-07-22 18:36 ` [RFC PATCH 1/4] kmemtrace: Core implementation Eduard - Gabriel Munteanu
2008-07-28  9:24   ` Pekka Enberg
2008-07-28 16:29     ` Mathieu Desnoyers
2008-07-28 17:09       ` Matt Mackall
2008-07-28 17:35       ` Eduard - Gabriel Munteanu
2008-07-29  8:25         ` Pekka Enberg

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=20080717143434.79b33fe9.rdunlap@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=cl@linux-foundation.org \
    --cc=eduard.munteanu@linux360.ro \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=penberg@cs.helsinki.fi \
    /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