From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1546 invoked by alias); 13 Oct 2015 00:33:12 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36847 Received: (qmail 6789 invoked from network); 13 Oct 2015 00:33:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=Ve91ZYSekSDYCuYNtiux7cxuqzU2Lo1JLCvRn1164aA=; b=fjadC3F93/+K/QdkHBvhTeOZY54GFGoIl07/KfMrGtjD0xB+oJpnxFQgKn7qe8Ivnb gUI5Vdqqda+dNeM5GzcWwaxMticLkxQ3KNRPTMMRCYQDBFgQ8j9fEvBSU4rY94Mne/ca RlO7SwUKuTYW2Pa55ny3ygziNJBsKsvrJ/cJPvfNu23m+4VArb/FjdzPi7RWfdlhuCWq gUjf9bxYqL3zBgaZez5hNNPvm1cvSQxflYXk5WCMrueZILEgkCXbFgIg108/3+N2b7Cq GiVImAxTDReoFSND3qSYmVH6B0FYq4237NCRng+sHqrDOv7WkxciQvyXLbybdiYg1ito sONg== X-Gm-Message-State: ALoCoQnJ9LkGbm7Br6HNaGHOjjbXIoBl1l9YVg7B3MKcmniX5RoRNKD0UTqEWB4hA2ZcZUbeRO6f X-Received: by 10.202.54.11 with SMTP id d11mr17400636oia.62.1444696388169; Mon, 12 Oct 2015 17:33:08 -0700 (PDT) From: Bart Schaefer Message-Id: <151012173304.ZM15477@torch.brasslantern.com> Date: Mon, 12 Oct 2015 17:33:04 -0700 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Slowdown around 5.0.5-dev-0" (Oct 12, 6:50pm) References: <151010105849.ZM10144@torch.brasslantern.com> <151010170623.ZM16166@torch.brasslantern.com> <151010232045.ZM12931@torch.brasslantern.com> <151011091757.ZM27755@torch.brasslantern.com> <151011103121.ZM8814@torch.brasslantern.com> <151011142204.ZM9103@torch.brasslantern.com> <151012070105.ZM15099@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Slowdown around 5.0.5-dev-0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 12, 6:50pm, Sebastian Gniazdowski wrote: } Subject: Re: Slowdown around 5.0.5-dev-0 } } On 12 October 2015 at 16:01, Bart Schaefer wrote: } > If you configure --enable-zsh-heap-debug you can edit mem.c to set a } > value for the heap_debug_verbosity variable } } Did that, set heap_debug_verbosity to 0x7f. When I issue a search, } screen gets constantly outputted with messages about heap pop. Yes, you probably want to prefix your test with { exec {fd}>&2 2>&debug_trace_file.txt # your test here } always { exec 2>&$fd } (choose your own file name). I mean to mention that but forgot. If you capture the output in a file (it may be a BIG file) you can do things like "fgrep -c allocated" to count the number of times each heap event happens. } Maybe the numbers mean something? Yes, they're an ID assigned every time a heap is either pushed or freed; e.g.: } HEAP DEBUG: heap 98f8 freed, new id is fb71a8. The heap ID is incremented once at each push or free, so there have been a minimum of 16439472 heap operations (fb71a8 - 98f8) between the creation of that heap and the eventual free. (Note the number of heap operations is the number of push+free multiplied by the average number of heap arenas, because a new ID is assigned to each arena every time.) There should be a message about "pushed" corresponding to each "popped", like this pair: } HEAP DEBUG: heap fb71a8 pushed, new id is fb71a9. } HEAP DEBUG: heap fb71a9 popped, old heap was fb71a8. You should also have sometimes seen "allocated memory from ..." or "create new heap ..." messages. The fact that your scrollback is almost entirely "popped" messages is an indication that you're really deep in a recursion at the time your script exits. -- Barton E. Schaefer