From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f42.google.com (mail-wm0-f42.google.com [74.125.82.42]) by dpdk.org (Postfix) with ESMTP id 0011156B7 for ; Mon, 15 Feb 2016 10:17:34 +0100 (CET) Received: by mail-wm0-f42.google.com with SMTP id g62so99513417wme.0 for ; Mon, 15 Feb 2016 01:17:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=+LtIxoxqVh+Ec3Pophim4KasXHBUNXMHs4LmLAATcrE=; b=Ezl73FlLMkSfD3WLeuH0pHpxYjYxPudrw3ISaBKuov1R/Fe0djGcHllQop/QXcbbwv hUTW7lyK+c2dXzIobjh4w4jf+2x54AKvgkzyCyO60OlAhjhHvsz6gxjea0Jf6siMS3cb pmWUyNNxCViGVlc5dUcYzCpS2NHWvlwifuWw6UGpfQM+xyMsQte637UiKljCLXe3usaj g6tP2gJm3p0Bh53JD2z6DELaFw4fL/fJZmpMDkoVC+eqzKVFNdEKww/l8QZE7u7G3SOa QDOLlaFoiII5p5trLtRkVrEps05wiR1dN7x4Ct+Gbm8UU+BkYVyy81qLAWgFMKJwTcwg JAdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=+LtIxoxqVh+Ec3Pophim4KasXHBUNXMHs4LmLAATcrE=; b=AogrIyUehIz6aUT7NfeHJo4/442CRXOLDAR7D9QwHoDYJ8+n+4ef767u+NNqqLwK9K /ug1JTCyNasbTjjlDKc59pZRm8Xs5nPhRQ57qoY37Z1+IyC7cUJvtCtUSOXGkR6PGSPB 3nzY0AaJF4vOW9ok7Pgw4JwOplHvZwAMqAd0A8tUvpaF9EFkLHW4qdldpGwAbA7n/2F6 4B1WDv9OQJ6Rkf+o9pf6BFSmrcinAg+YkhHaCYYCQoDdng2aIKmsBcxCojK5uMsuHzB6 hNllMV4YrmMCFTQiHzdh7BrMTnBnJ9IGskrCC8U3jJfoQDypTwNb/PN7dnufSRWzilQc 0JpA== X-Gm-Message-State: AG10YOQGEusUywAhkJRlOqhmNKy3TPrb8Wq1hnmAfKv54N0Sq6FBdVr/fIEMCTfXAEzely2O X-Received: by 10.194.78.4 with SMTP id x4mr7041432wjw.150.1455527854814; Mon, 15 Feb 2016 01:17:34 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id l132sm14628401wmf.7.2016.02.15.01.17.33 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 15 Feb 2016 01:17:34 -0800 (PST) From: Thomas Monjalon To: Luca Boccassi Date: Mon, 15 Feb 2016 10:16:03 +0100 Message-ID: <1721773.5Epq0nJNZu@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <1455366618.3599.35.camel@brocade.com> References: <1455144896.2805.32.camel@brocade.com> <1719358.h1p3ccrXDn@xps13> <1455366618.3599.35.camel@brocade.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Mon, 15 Feb 2016 09:17:35 -0000 2016-02-13 12:30, Luca Boccassi: > On Thu, 2016-02-11 at 08:34 +0100, Thomas Monjalon wrote: > > 2016-02-10 22:54, Luca Boccassi: > > 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. > > > > Thank you Luca. > > I think it deserves to be visible in the DPDK doc. > > What about adding some explanations in > > https://urldefense.proofpoint.com/v2/url?u=http-3A__dpdk.org_doc_guides_prog-5Fguide_profile-5Fapp.html&d=CwICAg&c=IL_XqQWOjubgfqINi2jTzg&r=QTEM8ICX7t_SLgWP3qPWtKiwKMps487LPWQx-B9AqIc&m=QXy2HY_6FCRpB2dqb0AfDLoTIJ2MpHaKS_Bd5WKYgMQ&s=d4OWq_1QIlrYTxkCHIsQqn7p0887PWo4RaYa7PZeeII&e= > > or > > https://urldefense.proofpoint.com/v2/url?u=http-3A__dpdk.org_doc_guides_prog-5Fguide_env-5Fabstraction-5Flayer.html-23malloc&d=CwICAg&c=IL_XqQWOjubgfqINi2jTzg&r=QTEM8ICX7t_SLgWP3qPWtKiwKMps487LPWQx-B9AqIc&m=QXy2HY_6FCRpB2dqb0AfDLoTIJ2MpHaKS_Bd5WKYgMQ&s=J36uf3GxS8AuoM2eQje4VTbXuF4WLmxGKIXM3RslaOA&e= > > ? > > Hi Thomas, > > Thanks, anything I could help with for that to happen? Yes, the documentation is in the git tree. If you have time, it would be nice to send a patch on this list to point your patches and explain how it works (below notes can be included). The guide for doc contribution is http://dpdk.org/doc/guides/contributing/documentation.html > Also, a few words about the actual implementation. > > Valgrind re-implements the whole *alloc and friends internally. There is > a common framework shared between the various tools, and each builds on > top of it. > > What I've done is to map the various rte_*alloc/free functions on top of > Valgrind's implementation of posix_memalign/free. This was done in order > to respect the cache alignment parameter of rte_malloc and friends. I've > tested to make sure that this works correctly, as we rely heavily upon > it. > > 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. The NUMA socket parameter will simply be ignored. I do > not believe it would be very useful to implement support for it, as it > doesn't add much. For the purpose of memory leaks detection, I don't > think it matters much on which socket a memory block is allocated. > > 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've added a note on Github. Thanks