From mboxrd@z Thu Jan 1 00:00:00 1970 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) Received: from [IPv6:2602:306:322e:5ae0:cae0:ebff:fe17:5b39] (unknown [IPv6:2602:306:322e:5ae0:cae0:ebff:fe17:5b39]) by mail.mhcomputing.net (Postfix) with ESMTPSA id 2C487FC; Sat, 13 Feb 2016 11:59:43 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 9.2 \(3112\)) From: Matthew Hall In-Reply-To: <1455366618.3599.35.camel@brocade.com> Date: Sat, 13 Feb 2016 11:59:42 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1455144896.2805.32.camel@brocade.com> <1719358.h1p3ccrXDn@xps13> <1455366618.3599.35.camel@brocade.com> To: Luca Boccassi X-Mailer: Apple Mail (2.3112) Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] DPDK (and rte_*alloc family) friendly Valgrind X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Feb 2016 19:59:44 -0000 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.=