From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Q7sKr-0001RG-CY for garchives@archives.gentoo.org; Thu, 07 Apr 2011 16:45:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 717551C043; Thu, 7 Apr 2011 16:45:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 410C51C0B9 for ; Thu, 7 Apr 2011 16:45:01 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D6E831BC0DA for ; Thu, 7 Apr 2011 16:45:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id DB82F8006D for ; Thu, 7 Apr 2011 16:44:59 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <268d9c5f73ef2b42ae9b85bb5e3eef25bc4a7314.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: / X-VCS-Repository: proj/libbash X-VCS-Files: .gitignore Makefile.am X-VCS-Directories: / X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 268d9c5f73ef2b42ae9b85bb5e3eef25bc4a7314 Date: Thu, 7 Apr 2011 16:44:59 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 7ed82fd1b820d945fb74ea4359ba7e69 commit: 268d9c5f73ef2b42ae9b85bb5e3eef25bc4a7314 Author: Petteri R=C3=A4ty petteriraty eu> AuthorDate: Thu Apr 7 11:59:02 2011 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Thu Apr 7 16:39:28 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D268d9c5f Add massif make target You can now run make massif to get a print for memory usage of interpreting a simple script. --- .gitignore | 2 ++ Makefile.am | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletions(-) diff --git a/.gitignore b/.gitignore index ed9707b..6b73188 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,8 @@ autom4te.cache cppunittests variable_printer ast_printer +long.sh +massif.out libbash.g libbash.tokens bashast.tokens diff --git a/Makefile.am b/Makefile.am index 77661e7..0b783f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -122,7 +122,9 @@ CLEANFILES =3D $(GENERATED_PARSER_C) \ libbashWalker.tokens \ javagrammar.run \ cgrammar.run \ - walker.run + walker.run \ + massif.out \ + long.sh =20 lib_LTLIBRARIES =3D libcppbash.la libcppbash_la_SOURCES =3D src/common.h \ @@ -195,3 +197,15 @@ javagrammar.run: bashast/bashast.g $(AM_V_at)mv $@.tmp $@ =20 $(check_JAVA): javagrammar.run + +long.sh: + rm -f $@ + for i in $$(seq 1 10000); do echo 'FOO=3D"bar"' >> $@; done + +massif.out: variable_printer long.sh + libtool --mode=3Dexecute valgrind \ + --tool=3Dmassif --massif-out-file=3Dmassif.out \ + ./variable_printer long.sh + +massif: massif.out + ms_print --threshold=3D10 $<