From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthew Hall Subject: Re: DPDK (and rte_*alloc family) friendly Valgrind Date: Sat, 13 Feb 2016 11:59:42 -0800 Message-ID: References: <1455144896.2805.32.camel@brocade.com> <1719358.h1p3ccrXDn@xps13> <1455366618.3599.35.camel@brocade.com> Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" To: Luca Boccassi Return-path: Received: from mail.mhcomputing.net (master.mhcomputing.net [74.208.228.170]) by dpdk.org (Postfix) with ESMTP id 11A595A06 for ; Sat, 13 Feb 2016 20:59:44 +0100 (CET) In-Reply-To: <1455366618.3599.35.camel@brocade.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Feb 13, 2016, at 4:30 AM, Luca Boccassi wrote: > I have not, however, implemented support for NUMA sockets. There is no > such concept inside Valgrind's framework at the moment, so it would be = a > monumental task. There is a way to mark the mallocs and frees from inside a custom = allocator instead of remapping to valgrind's allocator. jemalloc uses = this if you enable it. I use jemalloc with my DPDK code for all the = variable-sized mallocs as I prefer it to librte_malloc, and valgrind = works fine on all those allocs because jemalloc calls the hinter = functions.=20 include/jemalloc/internal/jemalloc_internal.h look for #ifdef JEMALLOC_VALGRIND > This might have an effect on cachegrind though, so it's worth noting = and > bearing it in mind when using cachegrind rather than memcheck. I am not sure that's much of a limitation really, because nobody would = use cachegrind on DPDK code I wouldn't think. Instead you would use = freely available VTune for open-source or you would use the perf = subsystem to monitor the cache performance counters. The only thing I am = aware of that Valgrind does, that the performance hardware cannot also = do, is memcheck. Unless I missed anything. Either way this is very handy to have. Matthew.=