DPDK patches and discussions
 help / color / mirror / Atom feed
From: Luca Boccassi <lboccass@Brocade.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: [dpdk-dev] DPDK (and rte_*alloc family) friendly Valgrind
Date: Wed, 10 Feb 2016 22:54:56 +0000	[thread overview]
Message-ID: <1455144896.2805.32.camel@brocade.com> (raw)

Hello all,

I created a set of patches for Valgrind that add support for the
rte_*alloc family of functions. We use it for memcheck (I added support
for other all the other Valgrind tools like cachegrind as well, but it's
less tested), and find it extremely useful, since the vanilla version
cannot intercept and report leaks cause by rte_*alloc functions from
librte_malloc.

While at FOSDEM last week I mentioned this to Mark Gray and Kevin
Traynor after their presentations (sorry it took a while to remember to
push this up :-) ), and they thought it would be useful for other
DPDK-based applications developers, so I've uploaded it to Github [1].
I've also sent the patches upstream a while ago [2].

It works with both with a statically and dynamically linked DPDK
library.

To use it with a statically linked DPDK, pass the following parameter to
Valgrind: --soname-synonyms=somalloc=NONE

To use it with a dynamically linked DPDK no additional parameter is
needed, but make sure that the SONAME matches either "lib*dpdk.so*" if
building a single .so or "librte_malloc.so*" if building each library
individually. If it doesn't match either of these regexp, then you can
manually patch the file include/pub_tool_redir.h and rebuild.

Please feel free to provide comments, feedback, or patches! All bug
reports will be promptly redirected to /dev/null :-)

-- 
Kind regards,
Luca Boccassi
Brocade Communications Systems

[1] https://github.com/bluca/valgrind-dpdk
[2] https://bugs.kde.org/show_bug.cgi?id=350405

             reply	other threads:[~2016-02-10 22:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-10 22:54 Luca Boccassi [this message]
2016-02-11  7:34 ` Thomas Monjalon
2016-02-13  6:47   ` Matthew Hall
2016-02-13 12:15     ` Luca Boccassi
2016-02-13 12:30   ` Luca Boccassi
2016-02-13 19:59     ` Matthew Hall
2016-02-15  9:16     ` Thomas Monjalon

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=1455144896.2805.32.camel@brocade.com \
    --to=lboccass@brocade.com \
    --cc=dev@dpdk.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).