From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Proposal: 'struct window' cleanup Date: Mon, 21 May 2012 18:25:36 +0400 Message-ID: <4FBA5060.7070702@yandex.ru> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------070505060000000206000709" X-Trace: dough.gmane.org 1337610230 2305 80.91.229.3 (21 May 2012 14:23:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 21 May 2012 14:23:50 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 21 16:23:49 2012 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SWTWU-0005qd-Pz for ged-emacs-devel@m.gmane.org; Mon, 21 May 2012 16:23:47 +0200 Original-Received: from localhost ([::1]:49866 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWTWU-0003Le-3j for ged-emacs-devel@m.gmane.org; Mon, 21 May 2012 10:23:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:59067) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWTWK-0003LD-HS for emacs-devel@gnu.org; Mon, 21 May 2012 10:23:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWTWC-0000q6-D7 for emacs-devel@gnu.org; Mon, 21 May 2012 10:23:36 -0400 Original-Received: from forward3.mail.yandex.net ([77.88.46.8]:43028) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWTWB-0000pw-He for emacs-devel@gnu.org; Mon, 21 May 2012 10:23:28 -0400 Original-Received: from smtp2.mail.yandex.net (smtp2.mail.yandex.net [77.88.46.102]) by forward3.mail.yandex.net (Yandex) with ESMTP id AFE81B40653 for ; Mon, 21 May 2012 18:23:25 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1337610205; bh=DR1ym4+WOk/h6u7v9wiMvMUo73b3hid9uVScuxvJ9sw=; h=Message-ID:Date:From:MIME-Version:To:Subject:Content-Type; b=M4PENr6ETzel+jNC9SzCuxuUwBYSdc46J9B6OU9hta2iKGbz5N9lQ8T/cHgBDDd/v 3F+1NTVZT1expqVUt7fI2Py8jce3bKsanjaz7gQP7cXJhUFrhqTgN2nNtu3nKeHfC7 w92SvxlxDXi5JFk04O7NATUtl9yoZwhSugMsm5HM= Original-Received: from smtp2.mail.yandex.net (localhost [127.0.0.1]) by smtp2.mail.yandex.net (Yandex) with ESMTP id 9D6C9E2057B for ; Mon, 21 May 2012 18:23:25 +0400 (MSK) Original-Received: from antipov.client.gelicon.ru (antipov.client.gelicon.ru [78.153.153.8]) by smtp2.mail.yandex.net (nwsmtp/Yandex) with ESMTP id NOF4PCvP-NPF4vSNt; Mon, 21 May 2012 18:23:25 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1337610205; bh=DR1ym4+WOk/h6u7v9wiMvMUo73b3hid9uVScuxvJ9sw=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:Subject: Content-Type; b=BLh0EN57Od3ZMhv1oXGK9dr1FaYaPn9e0rkU/+cjpU6GjZemOQljlccWUaybDdeYd 56Kz9dWbIIxyK8PjRuiyV7Av2AdBgSB8EWoeSSeQz6tkvVfI7Xb6Y4bWl1Bl8PwIfC VubRK8YY2WtN7F0lse5/O7lbKx7O78ypAMpkH6wE= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 77.88.46.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:150577 Archived-At: This is a multi-part message in MIME format. --------------070505060000000206000709 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit This patch drops some Lisp_Object fields (used only as booleans with Qt or Qnil values) from 'struct window', replacing them with bitfields. This is proposed to 1) shrink the memory footprint of the structure and 2) get a tiny speedup of GC by reducing the number of fields to trace at mark phase. Dmitry --------------070505060000000206000709 Content-Type: text/plain; charset=UTF-8; name="window_cleanup.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="window_cleanup.patch" PT09IG1vZGlmaWVkIGZpbGUgJ3NyYy9maWxlaW8uYycKLS0tIHNyYy9maWxlaW8uYwkyMDEy LTA1LTA0IDIzOjE2OjQ3ICswMDAwCisrKyBzcmMvZmlsZWlvLmMJMjAxMi0wNS0yMSAxNDox NjowOSArMDAwMApAQCAtMzczMiw3ICszNzMyLDcgQEAKIAkgIC8qIElmIGRpc3BsYXkgY3Vy cmVudGx5IHN0YXJ0cyBhdCBiZWdpbm5pbmcgb2YgbGluZSwKIAkgICAgIGtlZXAgaXQgdGhh dCB3YXkuICAqLwogCSAgaWYgKFhCVUZGRVIgKFhXSU5ET1cgKHNlbGVjdGVkX3dpbmRvdykt PmJ1ZmZlcikgPT0gY3VycmVudF9idWZmZXIpCi0JICAgIFhXSU5ET1cgKHNlbGVjdGVkX3dp bmRvdyktPnN0YXJ0X2F0X2xpbmVfYmVnID0gRmJvbHAgKCk7CisJICAgIFhXSU5ET1cgKHNl bGVjdGVkX3dpbmRvdyktPnN0YXJ0X2F0X2xpbmVfYmVnX3AgPSAhTklMUCAoRmJvbHAgKCkp OwogCiAJICByZXBsYWNlX2hhbmRsZWQgPSAx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lu ZG93c19vcl9idWZmZXJzX2NoYW5nZWQgYW55d2F5LiAgKi8KICAgICAgIGlmICh3aW5kb3dz X29yX2J1ZmZlcnNfY2hhbmdlZAotCSAgfHwgIU5JTFAgKHctPnVwZGF0ZV9tb2RlX2xpbmUp CisJICB8fCB3LT51cGRhdGVfbW9kZV9saW5lX3AKIAkgIHx8IHVwZGF0ZV9tb2RlX2xpbmVz CiAJICB8fCAoKEJVRl9TQVZFX01PRElGRiAoWEJVRkZFUiAody0+YnVmZmVyKSkKIAkgICAg ICAgPCBCVUZfTU9ESUZGIChYQlVGRkVSICh3LT5idWZmZXIpKSkKLQkgICAgICAhPSAhTklM UCAody0+bGFzdF9oYWRfc3RhcikpCisJICAgICAgIT0gdy0+bGFzdF9oYWRfc3Rhcl9wKQog CSAgfHwgKCghTklMUCAoVnRyYW5zaWVudF9tYXJrX21vZGUpCiAJICAgICAgICYmICFOSUxQ IChCVkFSIChYQlVGRkVSICh3LT5idWZmZXIpLCBtYXJrX2FjdGl2ZSkpKQogCSAgICAgICE9 ICFOSUxQICh3LT5yZWdpb25fc2hvd2luZykpKQpAQCAtMTE0MDEsNyArMTE0MDEsNyBAQAog ICAgICAgICAgICAgICBCTE9DS19JTlBVVDsKICAgICAgICAgICAgICAgZi0+dG9vbF9iYXJf aXRlbXMgPSBuZXdfdG9vbF9iYXI7CiAgICAgICAgICAgICAgIGYtPm5fdG9vbF9iYXJfaXRl bXMgPSBuZXdfbl90b29sX2JhcjsKLSAgICAgICAgICAgICAgdy0+dXBkYXRlX21vZGVfbGlu ZSA9IFF0OworICAgICAgICAgICAgICB3LT51cGRhdGVfbW9kZV9saW5lX3AgPSAxOwogICAg ICAgICAgICAgICBVTkJMT0NLX0lOUFVUOwogICAgICAgICAgICAgfQogCkBAIC0xMjk1MCw5 ICsxMjk1MCw5IEBACiAgICAgdXBkYXRlX21vZGVfbGluZXMrKzsKIAogICAvKiBEZXRlY3Qg Y2FzZSB0aGF0IHdlIG5lZWQgdG8gd3J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xpbmUgPSBRdDsKKyAgICB3LT51cGRh dGVfbW9kZV9saW5lX3AgPSAxOwogCiAgIC8qIFNldCB3aW5kb3dfZW5kX3BvcyB0byB0aGUg b2Zmc2V0IG9mIHRoZSBsYXN0IGNoYXJhY3RlciBkaXNwbGF5ZWQKICAgICAgb24gdGhlIHdp bmRvdyBmcm9tIHRoZSBlbmQgb2YgY3VycmVudF9idWZmZXIuICBTZXQKCj09PSBtb2RpZmll ZCBmaWxlICdzcmMveGZucy5jJwotLS0gc3JjL3hmbnMuYwkyMDEyLTA1LTE5IDIxOjQ2OjQz ICswMDAwCisrKyBzcmMveGZucy5jCTIwMTItMDUtMjEgMTQ6MTY6MDkgKzAwMDAKQEAgLTEy MTUsNyArMTIxNSw3IEBACiAgICAgICBGUkFNRV9FWFRFUk5BTF9NRU5VX0JBUiAoZikgPSAx OwogICAgICAgaWYgKEZSQU1FX1hfUCAoZikgJiYgZi0+b3V0cHV0X2RhdGEueC0+bWVudWJh cl93aWRnZXQgPT0gMCkKIAkvKiBNYWtlIHN1cmUgbmV4dCByZWRpc3BsYXkgc2hvd3MgdGhl IG1lbnUgYmFyLiAgKi8KLQlYV0lORE9XIChGUkFNRV9TRUxFQ1RFRF9XSU5ET1cgKGYpKS0+ dXBkYXRlX21vZGVfbGluZSA9IFF0OworCVhXSU5ET1cgKEZSQU1FX1NFTEVDVEVEX1dJTkRP VyAoZikpLT51cGRhdGVfbW9kZV9saW5lX3AgPSAxOwogICAgIH0KICAgZWxzZQogICAgIHsK Cg== --------------070505060000000206000709--