From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 10 07:39:03 2013 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 604E4122; Thu, 10 Jan 2013 07:39:03 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id D05927E7; Thu, 10 Jan 2013 07:39:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r0A7csXL077103; Thu, 10 Jan 2013 09:38:54 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.4 kib.kiev.ua r0A7csXL077103 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r0A7cska077102; Thu, 10 Jan 2013 09:38:54 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 10 Jan 2013 09:38:54 +0200 From: Konstantin Belousov To: Alfred Perlstein Subject: Re: malloc+utrace, tracking memory leaks in a running program. Message-ID: <20130110073854.GQ2561@kib.kiev.ua> References: <50D52B10.1060205@mu.org> <50EE6281.7030602@mu.org> <50EE6630.2010902@mu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZqRzwd/9tauJXEMK" Content-Disposition: inline In-Reply-To: <50EE6630.2010902@mu.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: Daniel Eischen , hackers@freebsd.org, Jason Evans X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jan 2013 07:39:03 -0000 --ZqRzwd/9tauJXEMK Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 10, 2013 at 01:56:48AM -0500, Alfred Perlstein wrote: > Here are more convenient links that give diffs against FreeBSD and=20 > jemalloc for the proposed changes: >=20 > FreeBSD: > https://github.com/alfredperlstein/freebsd/compare/13e7228d5b83c8fcfc63a0= 803a374212018f6b68~1...utrace2 >=20 Why do you need to expedite the records through the ktrace at all ? Wouldn't direct write(2)s to a file allow for better performance due to not stressing kernel memory allocator and single writing thread ? Also, the malloc coupling to the single-system interface would be prevented. I believe that other usermode tracers also behave in the similar way, using writes and not private kernel interface. Also, what /proc issues did you mentioned ? There is sysctl kern.proc.vmmap which is much more convenient than /proc/pid/map and does not require /proc mounted. > jemalloc: > https://github.com/alfredperlstein/jemalloc/compare/master...utrace2 >=20 > -Alfred >=20 > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" --ZqRzwd/9tauJXEMK Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQ7nANAAoJEJDCuSvBvK1BI0YP/3luZYesC/OpGaRrMZrBXBZK qjra23pzuMZ1FDXY72b1duogO7aV91VviBNFzE7eJLzeTN62W/1kN3PoSyIBJW5P T+cekDyUBiYb4xGuoTVM2/B+rdy1sCsklIWalN38F4PbfyJeEpOwiwYRXQ8TL7l/ YyTNquB79+yadDRQv8okcQFs38gAMNVzaYgphtTNCK3xQKM/s5hG3Kt5Tw3JNHqI lH/qAJiSqaZIQBqjQyYVtqq9WxHjC3rSDTCdEt8rtv4Exw2LwHMKNOUcNjQ0lq0F v9FblY5IrPbbx8lVToNNu2bmm2smqA3AuHMDrYDZSOLbJB1wYMZ7S0bhmUMXtx62 0ujnlThltm5uc042DGWVBCzdrMxkG6orFDo8IZlNK7aPIl/froL/iaNfS7jLcEVi TouSVgmjSS8fPFvvIBlN1Y0iKJoKNTchvUzOtvnyw40YY1fZ3XfStAez7ocKsfmC MBSXv8m7b8GCjIRfAdpNol3fOq6SS0IMyHxlBQOVfkVXgBMLn2A/0rkSpc4/uScd c0HdutalMUYGZtCoku9aOgaKB+mtY4e06qxQh02H6y/0EZPbQjMgBju048qqSdRq FFlhomrChC/tnee6X6G4Gma3BcBh1EKYfnfHiEhD16KZE4AWsTsBL6mgGvArMl7r P/Ssw7jQG3bb5l1Qp4LQ =ZoGY -----END PGP SIGNATURE----- --ZqRzwd/9tauJXEMK--