From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Carstens Subject: Re: [PATCH 1/2] KVM: s390: use switch vs jump table in priv.c Date: Thu, 8 Feb 2018 09:01:47 +0100 Message-ID: <20180208080147.GB3937@osiris> References: <20180206112127.19014-1-borntraeger@de.ibm.com> <20180206112127.19014-2-borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Janosch Frank , KVM , Cornelia Huck , linux-s390 , David Hildenbrand To: Christian Borntraeger Return-path: Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:55502 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750815AbeBHIBz (ORCPT ); Thu, 8 Feb 2018 03:01:55 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w1881WFh077009 for ; Thu, 8 Feb 2018 03:01:54 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2g0gmu4fy4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 08 Feb 2018 03:01:54 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 8 Feb 2018 08:01:52 -0000 Content-Disposition: inline In-Reply-To: <20180206112127.19014-2-borntraeger@de.ibm.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, Feb 06, 2018 at 11:21:26AM +0000, Christian Borntraeger wrote: > instead of having huge jump tables for function selection, > lets use normal switch/case statements for the instruction > handlers in priv.c > > bloat-o-meter shows that the saving are even bigger than > just the removed jump tables. Which is not true since bloat-o-meter does not take the rodata section into account, which grows by 1720 bytes with this commit. > add/remove: 0/11 grow/shrink: 8/0 up/down: 1934/-10246 (-8312) > Function old new delta > kvm_s390_handle_b2 42 958 +916 > handle_iske 178 558 +380 > handle_rrbe 178 546 +368 > kvm_s390_handle_b9 42 222 +180 > kvm_s390_handle_01 42 74 +32 > kvm_s390_handle_eb 42 70 +28 > handle_sckpf 176 204 +28 > handle_lctlg 628 630 +2 > handle_ptff 36 - -36 > handle_sckpf.part 78 - -78 > handle_epsw 154 - -154 > handle_stfl 316 - -316 > handle_rrbe.part 470 - -470 > handle_iske.part 482 - -482 > handle_io_inst 518 - -518 > x01_handlers 2048 - -2048 > eb_handlers 2048 - -2048 > b9_handlers 2048 - -2048 > b2_handlers 2048 - -2048 > > Signed-off-by: Christian Borntraeger