From patchwork Fri May 30 07:57:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 353919 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3201914007B for ; Fri, 30 May 2014 17:56:41 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=kqQvRUpoFCgcqaLd6k3/i/A5ygRm6 Lo8MBlr5fOjh1amn2HbG9gjtgIo8/2f8hNECRUwJm3tslh1ib0Se0s2vIL4W/tSl re2JULPxTd4VKcn1oC84aCpuoVXtGFl62T/NBrDOQO4ADP6VCetZujntzQ2pgnll A3x1MacA+r86q4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=7Q1J9X1QcXQrkkiMF7X1LUmaoIc=; b=XBn Z4L5UXq+DUPbWKY9/f3M35a9wbbR3LrNnH99EIVawhBMTnBKcfUOizo0pAIAHCSu qGwLJTtlyOWKjRzEgg48HeUDeGi8y+xjIxhh5NhEWzSE0AnLu2uHNh6veUdTHbzH t2pE/guD8gr2tn6uxCj9yxrB5GCYAJWaB4osP7wI= Received: (qmail 8659 invoked by alias); 30 May 2014 07:56:35 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 8648 invoked by uid 89); 30 May 2014 07:56:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.9 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Fri, 30 May 2014 13:27:50 +0530 From: Siddhesh Poyarekar To: libc-alpha@sourceware.org Subject: [PATCH] Add mmapped count and size in malloc_info Message-ID: <20140530075749.GP12497@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) Hi, malloc_info currently only gives information about allocations on heap, which is not complete without information about allocations that were satisfied using mmap. This trivial patch adds this information as a new element to the xml. This patch goes on top of Ondrej's patch to inline mi_arena. OK to commit? Siddhesh * malloc/malloc (malloc_info): Also print mmapped statistics. diff --git a/malloc/malloc.c b/malloc/malloc.c index 963a333..9e98c6d 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -5148,12 +5148,14 @@ malloc_info (int options, FILE *fp) fprintf (fp, "\n" "\n" + "\n" "\n" "\n" "\n" "\n" "\n", total_nfastblocks, total_fastavail, total_nblocks, total_avail, + mp_.n_mmaps, mp_.mmapped_mem, total_system, total_max_system, total_aspace, total_aspace_mprotect);