From owner-freebsd-current@FreeBSD.ORG Mon Dec 23 18:12:40 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A9B32B1 for ; Mon, 23 Dec 2013 18:12:40 +0000 (UTC) Received: from mailuogwdur.emc.com (mailuogwdur.emc.com [128.221.224.79]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A752E1241 for ; Mon, 23 Dec 2013 18:12:39 +0000 (UTC) Received: from maildlpprd54.lss.emc.com (maildlpprd54.lss.emc.com [10.106.48.158]) by mailuogwprd54.lss.emc.com (Sentrion-MTA-4.3.0/Sentrion-MTA-4.3.0) with ESMTP id rBNHqGQo019423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 23 Dec 2013 12:52:21 -0500 X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd54.lss.emc.com rBNHqGQo019423 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=isilon.com; s=jan2013; t=1387821141; bh=KPg92VKaIZN7p0SdffJmdhL8iQ0=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=d83j4h6463c5YaHPmiSeFuexEJA10gJ50zhzkUz53gwo+oagrMZwlvxFSY3fp3liv mhhHG8KWY1cNPFZI7BxXOUN3T6pNtj3R32ohRTmL7JL/iQKRo94Wf/iRsDI4K6g+f5 NdNAnRduUFqGby4NYjmpOfnQEWsh1NdvwIxv9lSw= X-DKIM: OpenDKIM Filter v2.4.3 mailuogwprd54.lss.emc.com rBNHqGQo019423 Received: from mailusrhubprd51.lss.emc.com (mailusrhubprd51.lss.emc.com [10.106.48.24]) by maildlpprd54.lss.emc.com (RSA Interceptor) for ; Mon, 23 Dec 2013 12:52:03 -0500 Received: from mxhub21.corp.emc.com (mxhub21.corp.emc.com [128.222.70.133]) by mailusrhubprd51.lss.emc.com (Sentrion-MTA-4.3.0/Sentrion-MTA-4.3.0) with ESMTP id rBNHq25e016164 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL) for ; Mon, 23 Dec 2013 12:52:03 -0500 Received: from MXHUB101.corp.emc.com (10.253.50.15) by mxhub21.corp.emc.com (128.222.70.133) with Microsoft SMTP Server (TLS) id 8.3.327.1; Mon, 23 Dec 2013 12:52:02 -0500 Received: from MX104CL01.corp.emc.com ([169.254.7.188]) by MXHUB101.corp.emc.com ([::1]) with mapi id 14.03.0158.001; Mon, 23 Dec 2013 12:52:02 -0500 From: "Rang, Anton" To: "freebsd-current@freebsd.org" Subject: A tweak to HWPMC hooks to improve code generation Thread-Topic: A tweak to HWPMC hooks to improve code generation Thread-Index: Ac8AAUbGjVAD1WTaQPOCKAzcZdfwMwABl1nw Date: Mon, 23 Dec 2013 17:52:01 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-originating-ip: [10.250.37.229] Content-Type: multipart/mixed; boundary="_004_F21EDC44C64DB34B90AF485AC3CEDD4B27F9DE7BMX104CL01corpem_" MIME-Version: 1.0 X-Sentrion-Hostname: mailusrhubprd51.lss.emc.com X-RSA-Classifications: public X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Dec 2013 18:12:40 -0000 --_004_F21EDC44C64DB34B90AF485AC3CEDD4B27F9DE7BMX104CL01corpem_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable The HWPMC hooks are never invoked except when using the soft PMC feature fo= r performance monitoring. This trivial patch hints as much to the compiler,= which then moves some fairly lengthy code sequences out of the locking pri= mitives (in particular), reducing their runtime footprint. This patch was reviewed by Attilio Rao. Anton --_004_F21EDC44C64DB34B90AF485AC3CEDD4B27F9DE7BMX104CL01corpem_ Content-Type: application/octet-stream; name="pmckern.diff" Content-Description: pmckern.diff Content-Disposition: attachment; filename="pmckern.diff"; size=810; creation-date="Mon, 23 Dec 2013 17:17:32 GMT"; modification-date="Mon, 23 Dec 2013 17:17:12 GMT" Content-Transfer-Encoding: base64 SW5kZXg6IHN5cy9zeXMvcG1ja2Vybi5oCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHN5cy9zeXMvcG1ja2Vybi5o CShyZXZpc2lvbiAyNTk2NjUpCisrKyBzeXMvc3lzL3BtY2tlcm4uaAkod29ya2luZyBjb3B5KQpA QCAtMTEwLDcgKzExMCw3IEBACiAjaWZkZWYgUE1DX0ZBS0VfVFJBUEZSQU1FCiAjZGVmaW5lIFBN Q19TT0ZUX0NBTEwocHIsIG1vLCBmdSwgbmEpCQkJCQkJXAogZG8gewkJCQkJCQkJCQlcCi0JaWYg KHBtY18jI3ByIyNfIyNtbyMjXyMjZnUjI18jI25hLnBzX3J1bm5pbmcpIHsJCQkJXAorCWlmIChf X3ByZWRpY3RfZmFsc2UocG1jXyMjcHIjI18jI21vIyNfIyNmdSMjXyMjbmEucHNfcnVubmluZykp IHsJXAogCQlzdHJ1Y3QgcG1ja2Vybl9zb2Z0IGtzOwkJCQkJCVwKIAkJcmVnaXN0ZXJfdCBpbnRy OwkJCQkJCVwKIAkJaW50ciA9IGludHJfZGlzYWJsZSgpOwkJCQkJCVwKQEAgLTEzNSw3ICsxMzUs NyBAQAogICovCiAjZGVmaW5lIFBNQ19TT0ZUX0NBTExfVEYocHIsIG1vLCBmdSwgbmEsIHRmKQkJ CQkJXAogZG8gewkJCQkJCQkJCQlcCi0JaWYgKHBtY18jI3ByIyNfIyNtbyMjXyMjZnUjI18jI25h LnBzX3J1bm5pbmcpIHsJCQkJXAorCWlmIChfX3ByZWRpY3RfZmFsc2UocG1jXyMjcHIjI18jI21v IyNfIyNmdSMjXyMjbmEucHNfcnVubmluZykpIHsJXAogCQlzdHJ1Y3QgcG1ja2Vybl9zb2Z0IGtz OwkJCQkJCVwKIAkJcmVnaXN0ZXJfdCBpbnRyOwkJCQkJCVwKIAkJaW50ciA9IGludHJfZGlzYWJs ZSgpOwkJCQkJCVwK --_004_F21EDC44C64DB34B90AF485AC3CEDD4B27F9DE7BMX104CL01corpem_--