From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=dandan.bi@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 88E7021B02845 for ; Mon, 21 May 2018 17:33:53 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2018 17:33:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,428,1520924400"; d="scan'208";a="43122981" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 21 May 2018 17:33:52 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.319.2; Mon, 21 May 2018 17:33:51 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.79]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.40]) with mapi id 14.03.0319.002; Tue, 22 May 2018 08:33:49 +0800 From: "Bi, Dandan" To: 'Ard Biesheuvel' , Leif Lindholm CC: "edk2-devel@lists.01.org" , "Zeng, Star" , "Gao, Liming" , Matt Sealey Thread-Topic: [edk2] [PATCH v2 3/8] MdeModulePkg/DxeCorePerformanceLib:Track FPDT record in DXE phase Thread-Index: AQHT4Wk+uZzpsozb10GZh4hKIRqYW6Q6VmiQ Date: Tue, 22 May 2018 00:33:48 +0000 Message-ID: <3C0D5C461C9E904E8F62152F6274C0BB3BAD755F@shsmsx102.ccr.corp.intel.com> References: <1517320437-11688-1-git-send-email-dandan.bi@intel.com> <1517320437-11688-4-git-send-email-dandan.bi@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTE0YTY2NTQtODYxNC00ZDFhLWFmNmMtMjExOGEwODk1Y2Y0IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiS1drWXpGUzJcL21XcU9UMlRiM1lUN2dZMzBXWGROMnlzZ0diY0loNDl3blwvYW95dzBKOEV1WGhwTGVudUx3YU1kIn0= x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH v2 3/8] MdeModulePkg/DxeCorePerformanceLib:Track FPDT record in DXE phase X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 May 2018 00:33:53 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 U29ycnkgZm9yIHRoZSBkZWxheWVkIHJlc3BvbnNlLg0KDQpUaGUgYWxsb2NhdGVkICBwZXJmb3Jt YW5jZSB0YWJsZSAoIGJlbG93IDRHICkgaXMgdG8gc2F2ZSB0aGUgYm9vdCBwZXJmb3JtYW5jZSBk YXRhIGluIG5vcm1hbCBib290IGFuZCBTMyBwaGFzZS4NClBFSU0gRmlybXdhcmVQZXJmb3JtYW5j ZVBlaSB3aWxsIGdldCB0aGUgYWRkcmVzcyBvZiB0aGUgcG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IGNvZGUuDQo+ICsNCj4gKyoqLw0KPiArRUZJX1NUQVRV Uw0KPiArQWxsb2NhdGVCb290UGVyZm9ybWFuY2VUYWJsZSAoDQo+ICsgICkNCj4gK3sNCj4gKyAg RUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgU3RhdHVzOw0KPiArICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgICAgICBTaXplOw0KPiArICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAg ICAqU21tQm9vdFJlY29yZENvbW1CdWZmZXI7DQo+ICsgIEVGSV9TTU1fQ09NTVVOSUNBVEVfSEVB REVSICAgICpTbW1Db21tQnVmZmVySGVhZGVyOw0KPiArICBTTU1fQk9PVF9SRUNPUkRfQ09NTVVO SUNBVEUgICAqU21tQ29tbURhdGE7DQo+ICsgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAg IENvbW1TaXplOw0KPiArICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICBCb290UGVyZm9y bWFuY2VEYXRhU2l6ZTsNCj4gKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgKkJvb3RQ ZXJmb3JtYW5jZURhdGE7DQo+ICsgIEVGSV9TTU1fQ09NTVVOSUNBVElPTl9QUk9UT0NPTCAgKkNv bW11bmljYXRpb247DQo+ICsgIEZJUk1XQVJFX1BFUkZPUk1BTkNFX1ZBUklBQkxFIFBlcmZvcm1h bmNlVmFyaWFibGU7DQo+ICsgIEVES0lJX1BJX1NNTV9DT01NVU5JQ0FUSU9OX1JFR0lPTl9UQUJM RSAqU21tQ29tbVJlZ2lvblRhYmxlOw0KPiArICBFRklfTUVNT1JZX0RFU0NSSVBUT1IgICAgICAg ICAqU21tQ29tbU1lbVJlZ2lvbjsNCj4gKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAg SW5kZXg7DQo+ICsgIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICAgICpTbW1Cb290UmVjb3Jk RGF0YTsNCj4gKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgU21tQm9vdFJlY29yZERh dGFTaXplOw0KPiArICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZE1lbVNp emU7DQo+ICsNCj4gKyAgLy8NCj4gKyAgLy8gQ29sbGVjdCBib290IHJlY29yZHMgZnJvbSBTTU0g ZHJpdmVycy4NCj4gKyAgLy8NCj4gKyAgU21tQm9vdFJlY29yZENvbW1CdWZmZXIgPSBOVUxMOw0K PiArICBTbW1Db21tRGF0YSAgICAgICAgICAgICA9IE5VTEw7DQo+ICsgIFNtbUJvb3RSZWNvcmRE YXRhICAgICAgID0gTlVMTDsNCj4gKyAgU21tQm9vdFJlY29yZERhdGFTaXplICAgPSAwOw0KPiAr ICBSZXNlcnZlZE1lbVNpemUgICAgICAgICA9IDA7DQo+ICsgIFN0YXR1cyA9IGdCUy0+TG9jYXRl UHJvdG9jb2wgKCZnRWZpU21tQ29tbXVuaWNhdGlvblByb3RvY29sR3VpZCwgTlVMTCwgKFZPSUQg KiopICZDb21tdW5pY2F0aW9uKTsNCj4gKyAgaWYgKCFFRklfRVJST1IgKFN0YXR1cykpIHsNCj4g KyAgICAvLw0KPiArICAgIC8vIEluaXRpYWxpemUgY29tbXVuaWNhdGUgYnVmZmVyDQo+ICsgICAg Ly8gR2V0IHRoZSBwcmVwYXJlZCBSZXNlcnZlZCBNZW1vcnkgUmFuZ2UNCj4gKyAgICAvLw0KPiAr ICAgIFN0YXR1cyA9IEVmaUdldFN5c3RlbUNvbmZpZ3VyYXRpb25UYWJsZSAoDQo+ICsgICAgICAg ICAgICAgICZnRWRraWlQaVNtbUNvbW11bmljYXRpb25SZWdpb25UYWJsZUd1aWQsDQo+ICsgICAg ICAgICAgICAgIChWT0lEICoqKSAmU21tQ29tbVJlZ2lvblRhYmxlDQo+ICsgICAgICAgICAgICAg ICk7DQo+ICsgICAgaWYgKCFFRklfRVJST1IgKFN0YXR1cykpIHsNCj4gKyAgICAgIEFT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Q29tbXVuaWNh dGUgKENvbW11bmljYXRpb24sIFNtbUJvb3RSZWNvcmRDb21tQnVmZmVyLCAmQ29tbVNpemUpOw0K PiArICAgICAgICBBU1NFUlRfRUZJX0VSUk9SIChTdGF0dXMpOw0KPiArDQo+ICsgICAgICAgIGlm ICghRUZJX0VSUk9SIChTbW1Db21tRGF0YS0+UmV0dXJuU3RhdHVzKSAmJiBTbW1Db21tRGF0YS0+ Qm9vdFJlY29yZFNpemUgIT0gMCkgew0KPiArICAgICAgICAgIC8vDQo+ICsgICAgICAgICAgLy8g R2V0IGFsbCBib290IHJlY29yZHMNCj4gKyAgICAgICAgICAvLw0KPiArICAgICAgICAgIFNtbUNv bW1EYXRhLT5GdW5jdGlvbiAgICAgICA9IFNNTV9GUERUX0ZVTkNUSU9OX0dFVF9CT09UX1JFQ09S RF9EQVRBX0JZX09GRlNFVDsNCj4gKyAgICAgICAgICBTbW1Cb290UmVjb3JkRGF0YVNpemUgICAg ICAgPSBTbW1Db21tRGF0YS0+Qm9vdFJlY29yZFNpemU7DQo+ICsgICAgICAgICAgU21tQm9vdFJl Y29yZERhdGEgICAgICAgICAgID0gQWxsb2NhdGVaZXJvUG9vbChTbW1Cb290UmVjb3JkRGF0YVNp emUpOw0KPiArICAgICAgICAgIEFTU0VSVCAoU21tQm9vdFJlY29yZERhdGEgICE9IE5VTEwpOw0K PiArICAgICAgICAgIFNtbUNvbW1EYXRhLT5Cb290UmVjb3JkT2Zmc2V0ID0gMDsNCj4gKyAgICAg ICAgICBTbW1Db21tRGF0YS0+Qm9vdFJlY29yZERhdGEgICA9IChWT0lEICopICgoVUlOVE4pIFNt bUNvbW1NZW1SZWdpb24tPlBoeXNpY2FsU3RhcnQgKyBTTU1fQk9PVF9SRUNPUkRfQ09NTV9TSVpF KTsNCj4gKyAgICAgICAgICBTbW1Db21tRGF0YS0+Qm9vdFJlY29yZFNpemUgICA9IFJlc2VydmVk TWVtU2l6ZSAtIFNNTV9CT09UX1JFQ09SRF9DT01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BTUUsDQo+ICsgICAgICAgICAgICAgICAgICAmZ0VmaUZpcm13YXJlUGVyZm9ybWFuY2VHdWlk LA0KPiArICAgICAgICAgICAgICAgICAgTlVMTCwNCj4gKyAgICAgICAgICAgICAgICAgICZTaXpl LA0KPiArICAgICAgICAgICAgICAgICAgJlBlcmZvcm1hbmNlVmFyaWFibGUNCj4gKyAgICAgICAg ICAgICAgICAgICk7DQo+ICsgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQo+ICsgICAgU3Rh dHVzID0gZ0JTLT5BbGxvY2F0ZVBhZ2VzICgNCj4gKyAgICAgICAgICAgICAgICAgICAgQWxsb2Nh dGVBZGRyZXNzLA0KPiArICAgICAgICAgICAgICAgICAgICBFZmlSZXNlcnZlZE1lbW9yeVR5cGUs DQo+ICsgICAgICAgICAgICAgICAgICAgIEVGSV9TSVpFX1RPX1BBR0VTIChCb290UGVyZm9ybWFu Y2VEYXRhU2l6ZSksDQo+ICsgICAgICAgICAgICAgICAgICAgICZQZXJmb3JtYW5jZVZhcmlhYmxl LkJvb3RQZXJmb3JtYW5jZVRhYmxlUG9pbnRlcg0KPiArICAgICAgICAgICAgICAgICAgICApOw0K PiArICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQo+ICsgICAgICBtQWNwaUJvb3RQZXJm b3JtYW5jZVRhYmxlID0gKEJPT1RfUEVSRk9STUFOQ0VfVEFCTEUgKikgKFVJTlROKSBQZXJmb3Jt YW5jZVZhcmlhYmxlLkJvb3RQZXJmb3JtYW5jZVRhYmxlUG9pbnRlcjsNCj4gKyAgICB9DQo+ICsg IH0NCj4gKw0KPiArICBpZiAobUFjcGlCb290UGVyZm9ybWFuY2VUYWJsZSA9PSBOVUxMKSB7DQo+ ICsgICAgLy8NCj4gKyAgICAvLyBGYWlsIHRvIGFsbG9jYXRlIGF0IHNwZWNpZmllZCBhZGRyZXNz LCBjb250aW51ZSB0byBhbGxvY2F0ZSBhdCBhbnkgYWRkcmVzcy4NC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xlIGFzIENvbnRy b2xsZXIgSGFuZGxlDQo+ICsgICAgICAvLw0KPiArICAgICAgU3RhdHVzID0gZ0JTLT5PcGVuUHJv dG9jb2wgKA0KPiArICAgICAgICAgICAgICAgICAgICBIYW5kbGUsDQo+ICsgICAgICAgICAgICAg ICAgICAgICZnRWZpRHJpdmVyQmluZGluZ1Byb3RvY29sR3VpZCwNCj4gKyAgICAgICAgICAgICAg ICAgICAgKFZPSUQgKiopICZEcml2ZXJCaW5kaW5nLA0KPiArICAgICAgICAgICAgICAgICAgICBO VUxMLA0KPiArICAgICAgICAgICAgICAgICAgICBOVUxMLA0KPiArICAgICAgICAgICAgICAgICAg ICBFRklfT1BFTl9QUk9UT0NPTF9HRVRfUFJPVE9DT0wNCj4gKyAgICAgICAgICAgICAgICAgICAg KTsNCj4gKyAgICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQo+ICsgICAgICAgIC8vDQo+ ICsgICAgICAgIC8vIEdldCBJbWFnZSBwcm90b2NvbCBmcm9tIEltYWdlSGFuZGxlDQo+ICsgICAg ICAgIC8vDQo+ICsgICAgICAgIFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KPiArICAg ICAgICAgICAgICAgICAgICAgIERyaXZlckJpbmRpbmctPkltYWdlSGFuZGxlLA0KPiArICAgICAg ICAgICAgICAgICAgICAgICZnRWZpTG9hZGVkSW1hZ2VQcm90b2NvbEd1aWQsDQo+ICsgICAgICAg ICAgICAgICAgICAgICAgKFZPSUQqKikgJkxvYWRlZEltYWdlDQo+ICsgICAgICAgICAgICAgICAg ICAgICAgKTsNCj4gKyAgICAgIH0NCj4gKyAgICB9DQo+ICsgIH0NCj4gKw0KPiArICBpZiAoIUVG SV9FUlJPUiAoU3RhdHVzKSAmJiBMb2FkZWRJbWFnZSAhPSBOVUxMKSB7DQo+ICsgICAgLy8NCj4g KyAgICAvLyBHZXQgTW9kdWxlIEd1aWQgZnJvbSBEZXZpY2VQYXRoLg0KP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IChtUGxhdGZvcm1MYW5ndWFnZSAh PSBOVUxMKSB7DQo+ICsgICAgICBTdGF0dXMgPSBDb21wb25lbnROYW1lMi0+R2V0RHJpdmVyTmFt ZSAoDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb21wb25lbnROYW1lMiwN Cj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1QbGF0Zm9ybUxhbmd1YWdlICE9 IE5VTEwgPyBtUGxhdGZvcm1MYW5ndWFnZSA6ICJlbi1VUyIsDQo+ICsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAmU3RyaW5nUHRyDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICApOw0KPiArICAgICAgaWYgKCFFRklfRVJST1IgKFN0YXR1cykpIHsNCj4gKyAgICAg ICAgZm9yIChJbmRleCA9IDA7IEluZGV4IDwgQnVmZmVyU2l6ZSAtIDEgJiYgU3RyaW5nUHRyW0lu ZGV4XSAhPSAwOyBJbmRleCsrKSB7DQo+ICsgICAgICAgICAgTmFtZVN0cmluZ1tJbmRleF0gPSAo Q0hBUjgpIFN0cmluZ1B0cltJbmRleF07DQo+ICsgICAgICAgIH0NCj4gKyAgICAgICAgTmFtZVN0 cmluZ1tJbmRleF0gPSAwOw0KPiArICAgICAgICAvLw0KPiArICAgICAgICAvLyBNb2R1bGUgTmFt ZSBpcyBnb3QuDQo+ICsgICAgICAgIC8vDQo+ICsgICAgICAgIGdvdG8gRG9uZTsNCj4gKyAgICAg IH0NCj4gKyAgICB9DQo+ICsgIH0NCj4gKw0KPiArICBpZiAoTW9kdWxlR3VpZElzR2V0KSB7DQo+ ICsgICAgLy8NCj4gKyAgICAvLyBNZXRob2QgMyBUcnkgdG8gZ2V0IHRoZSBpbWFnZSdzIEZGUyBV SSBzZWN0aW9uIGJ5IGltYWdlIEdVSUQNCj4gKyAgICAvLw0KPiArICAgIFN0cmluZ1B0ciAgPSBO VUxMOw0KPiArICAgIFN0c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Z1bGx5Lg0KPiArICBAcmV0dmFs IEVGSV9VTlNVUFBPUlRFRCAgICAgIE5vIG1hdGNoZWQgRlBEVCByZWNvcmQuDQo+DQo+ICAqKi8N Cj4gLVVJTlQzMg0KPiAtSW50ZXJuYWxTZWFyY2hGb3JHYXVnZUVudHJ5ICgNCj4gLSAgSU4gQ09O U1QgVk9JRCAgICAgICAgICAgICAgICAgKkhhbmRsZSwgIE9QVElPTkFMDQo+IC0gIElOIENPTlNU IENIQVI4ICAgICAgICAgICAgICAgICpUb2tlbiwgICBPUFRJT05BTA0KPiAtICBJTiBDT05TVCBD SEFSOCAgICAgICAgICAgICAgICAqTW9kdWxlLCAgIE9QVElPTkFMDQo+IC0gIElOIFVJTlQzMiAg ICAgICAgICAgICAgICAgICAgIElkZW50aWZpZXINCj4gK0VGSV9TVEFUVVMNCj4gK0dldEZwZHRS ZWNvcmRJbmZvICgNCj4gKyAgSU4gQk9PTEVBTiAgICAgICAgICAgICAgICAgIElzU3RhcnQsDQo+ ICsgIElOIENPTlNUIFZPSUQgICAgICAgICAgICAgICAqSGFuZGxlLA0KPiArICBJTiBDT05TVCBD SEFSOCAgICAgICAgICAgICAgKlRva2VuLA0KPiArICBJTiBDT05TVCBDSEFSOCAgICAgICAgICAg ICAgKk1vZHVsZSwNCj4gKyAgT1VUIEJBU0lDX1JFQ09SRF9JTkZPICAgICAgICpSZWNvcmRJbmZv LA0KPiArICBJTiBPVVQgQk9PTEVBTiAgICAgICAgICAgICAgKlVzZU1vZHVsZU5hbWUNCj4gICAg KQ0KPiAgew0KPiAtICBVSU5UMzIgICAgICAgICAgICAgICAgICAgIEluZGV4Ow0KPiAtICBVSU5U MzIgICAgICAgICAgICAgICAgICAgIEluZGV4MjsNCj4gLSAgVUlOVDMyICAgICAgICAgICAgICAg ICAgICBOdW1iZXJPZkVudHJpZXM7DQo+IC0gIEdBVUdFX0RBVEFfRU5UUllfRVggICAgICAgKkdh dWdlRW50cnlFeEFycmF5Ow0KPiArICBVSU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Yik7DQo+ICsgICAgUGVpUGVyZm9ybWFuY2VMb2dIZWFkZXIgPSAoUEVJX0VYVF9G SVJNV0FSRV9QRVJGX0hFQURFUiAqKUZpcm13YXJlUGVyZm9ybWFuY2VIb2I7DQo+ICsNCj4gKyAg ICBpZiAobVBlcmZvcm1hbmNlTGVuZ3RoICsgUGVpUGVyZm9ybWFuY2VMb2dIZWFkZXItPlNpemVP ZkFsbEVudHJpZXMgPiBtTWF4UGVyZm9ybWFuY2VMZW5ndGgpIHsNCj4gKyAgICAgIG1QZXJmb3Jt YW5jZVBvaW50ZXIgPSBSZWFsbG9jYXRlUG9vbCAoDQo+ICsgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBtUGVyZm9ybWFuY2VMZW5ndGgsDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBtUGVyZm9ybWFuY2VMZW5ndGggKw0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKFVJTlROKVBlaVBlcmZvcm1hbmNlTG9nSGVhZGVyLT5TaXplT2ZBbGxFbnRyaWVzICsNCj4g KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJUk1XQVJFX1JFQ09SRF9CVUZGRVIsDQo+ ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtUGVyZm9ybWFuY2VQb2ludGVyDQo+ICsg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KPiArICAgICAgQVNTRVJUIChtUGVyZm9y bWFuY2VQb2ludGVyICE9IE5VTEwpOw0KPiArICAgICAgbU1heFBlcmZvcm1hbmNlTGVuZ3RoID0g bVBlcmZvcm1hbmNlTGVuZ3RoICsNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChV SU5UTikoUGVpUGVyZm9ybWFuY2VMb2dIZWFkZXItPlNpemVPZkFsbEVudHJpZXMpICsNCj4gKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZJUk1XQVJFX1JFQ09SRF9CVUZGRVI7DQo+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IGZpbGxlZCBpbiB3aXRoIHRoZSB2YWx1ZQ0KPiArICByZWFkIGZyb20g dGhlIGN1cnJlbnQgdGltZSBzdGFtcC4NCj4NCj4gLSAgbUdhdWdlRGF0YS0+TnVtYmVyT2ZFbnRy aWVzKys7DQo+ICsgIEBwYXJhbSAgSGFuZGxlICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBl bnZpcm9ubWVudCBzcGVjaWZpYyBjb250ZXh0IHVzZWQNCj4gKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB0byBpZGVudGlmeSB0aGUgY29tcG9uZW50IGJlaW5nIG1lYXN1cmVkLg0K PiArICBAcGFyYW0gIFRva2VuICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gYSBOdWxsLXRl cm1pbmF0ZWQgQVNDSUkgc3RyaW5nDQo+ICsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdGhhdCBpZGVudGlmaWVzIHRoZSBjb21wb25lbnQgYmVpbmcgbWVhc3VyZWQuDQo+ICsgIEBw YXJhbSAgTW9kdWxlICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBhIE51bGwtdGVybWluYXRl ZCBBU0NJSSBzdHJpbmcNCj4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGF0 IGlkZW50aWZpZXMgdGhlIG1vZHVsZSBiZWluZyBtZWFzdXJlZC4NCj4gKyAgQHBhcmFtICBUaW1l U3RhbXAgICAgICAgICAgICAgICA2NC1iaXQgdGltZSBzdGFtcC4NCj4gKyAgQHBhcmFtICBJZGVu dGlmaWVyICAgICAgICAgICAgICAzMi1iaXQgaWRlbnRpZmllci4gSWYgdGhlIHZhbHVlIGlzIDAs IHRoZSBjcmVhdGVkIHJlY29yZA0KPiArICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGlzIHNhbWUgYXMgdGhlIG9uZSBjcmVhdGVkIGJ5IFN0YXJ0R2F1Z2Ugb2YgUEVSRk9STUFOQ0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