From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: steven.shi@intel.com) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by groups.io with SMTP; Tue, 24 Sep 2019 01:12:34 -0700 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Sep 2019 01:12:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,543,1559545200"; d="scan'208,217,223";a="213609951" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga004.fm.intel.com with ESMTP; 24 Sep 2019 01:12:33 -0700 Received: from fmsmsx113.amr.corp.intel.com (10.18.116.7) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 24 Sep 2019 01:12:33 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX113.amr.corp.intel.com (10.18.116.7) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 24 Sep 2019 01:12:32 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.113]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.32]) with mapi id 14.03.0439.000; Tue, 24 Sep 2019 16:12:30 +0800 From: "Steven Shi" To: "Lin, Derek (HPS SW)" , "devel@edk2.groups.io" CC: "Feng, Bob C" , "Gao, Liming" Subject: Re: BaseTools --hash malfunction after migrate from stable201905 to stable201908 Thread-Topic: BaseTools --hash malfunction after migrate from stable201905 to stable201908 Thread-Index: AdVveLlk2vAsuUUVQqOo7w9XnpiX4QCamsiQADIklwA= Date: Tue, 24 Sep 2019 08:12:29 +0000 Message-ID: <06C8AB66E78EE34A949939824ABE2B3140183293@shsmsx102.ccr.corp.intel.com> References: Accept-Language: en-US X-MS-Has-Attach: yes X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZWE0NmM5OWMtY2U2Yi00YmJhLTkwMmItMWZiMzAwMWU2MmMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiVnVtakNFSVJLXC8reUFaOVN4eThnaElCQjNGK0dWeTNUS3BWcUlZa2ZTSmllZGF2V240WDZQdDNTRVREd1pITnEifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: steven.shi@intel.com X-Groupsio-MsgNum: 47909 Content-Language: en-US Content-Type: multipart/mixed; boundary="_004_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_" --_004_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_ Content-Type: multipart/alternative; boundary="_000_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_" --_000_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Derek, I took a look at this issue, and add back the -hash functionality in this b= ranch: https://github.com/shijunjing/edk2/tree/hashcache_v1. The attachment= is the patch based on latest edk2. The current -hash fix performance is not as good as the edk2-stable201905, = because the edk2-stable201905 -hash doesn't parse source code header files= and not include the header files as the module's hash dependency which is = not sound. After add the header files dependency, the -hash become slow. Let me know whether the attached fix works for you. I might continue to tun= e its performance. Thanks Steven Shi Intel\SSG\FID\Firmware Infrastructure From: Shi, Steven Sent: Monday, September 23, 2019 3:52 PM To: 'Lin, Derek (HPS SW)' ; devel@edk2.groups.io Cc: Feng, Bob C ; Gao, Liming (liming.gao@intel.com) = Subject: RE: BaseTools --hash malfunction after migrate from stable201905 t= o stable201908 Hi Derek, Thank you to raise this issue. We will fix it and add back the --hash origi= nal functionality. Thanks Steven From: Lin, Derek (HPS SW) [mailto:derek.lin2@hpe.com] Sent: Friday, September 20, 2019 2:54 PM To: devel@edk2.groups.io Cc: Feng, Bob C >; Shi, S= teven > Subject: BaseTools --hash malfunction after migrate from stable201905 to st= able201908 Hi BaseTools experts, We saw the clean build performance improvement after updating from edk2-sta= ble201905 to edk2-stable201908, which is promising. But we found the incremental build time increase 25%~35%, which is not good= . We're building server platform. And we use --hash to speed up incremental b= uild as described in https://github.com/BobCF/edk2/wiki/Incremental-Build After upgrading to edk2-stable201908, none of AutoGen is skipped when I did= an incremental build without any code change. Dig into the issue, it is caused by commit https://github.com/tianocore/edk= 2/commit/0e7e7a264cd80ab71ea0f9e9da2d0617d4b539c4 >>From the code change logic, it seems like it require both --hash and --bina= ry-source to perform cache based incremental build. However, when we only h= ave --hash in build flag, it is not functional. Here's a build time log retrieved from -y report.log. 201905 incremental | 201908 increm= ental | 201905 clean | 201908 clean Build Duration: 00:03:44 00:04:40 = 00:07:12 00:06:19 AutoGen Duration: 00:02:40 00:03:15 = 00:04:28 00:03:09 Make Duration: 00:00:36 00:00:39 = 00:01:21 00:01:34 GenFds Duration: 00:00:27 00:00:28 = 00:01:22 00:01:18 We could see the AutoGen Duration has almost no change between clean and in= cremental build in 201908. Could we fix this? Thanks, Derek --_000_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi Derek,

I took a look at this = issue, and add back the –hash functionality in this branch: htt= ps://github.com/shijunjing/edk2/tree/hashcache_v1. The attachment is the patch based on latest edk2.

The current –has= h fix performance is not as good as the edk2-stable201905,  because th= e edk2-stable201905 –hash doesn’t parse source code header file= s and not include the header files as the module’s hash dependency which is not sound. After add the header files dependency, the –hash= become slow.

Let me know whether th= e attached fix works for you. I might continue to tune its performance.

 

 

Thanks

 

Steven Shi

Intel\SSG\FID\Firmware Infrastructur= e

 

From: Shi= , Steven
Sent: Monday, September 23, 2019 3:52 PM
To: 'Lin, Derek (HPS SW)' <derek.lin2@hpe.com>; devel@edk2.gro= ups.io
Cc: Feng, Bob C <bob.c.feng@intel.com>; Gao, Liming (liming.ga= o@intel.com) <liming.gao@intel.com>
Subject: RE: BaseTools --hash malfunction after migrate from stable2= 01905 to stable201908

 

Hi Derek,

Thank you to raise thi= s issue. We will fix it and add back the --hash original functionality.

 

 

Thanks

Steven

 

From: Lin, Derek (HPS SW) [mailto:derek.lin2@hpe.com]
Sent: Friday, September 20, 2019 2:54 PM
To: devel@edk2.groups.io=
Cc: Feng, Bob C <bob.c.fe= ng@intel.com>; Shi, Steven <steven.shi@intel.com>
Subject: BaseTools --hash malfunction after migrate from stable20190= 5 to stable201908

 

Hi BaseTools experts,

 

We saw the clean build performance improvement after= updating from edk2-stable201905 to edk2-stable201908, which is promising.<= o:p>

But we found the incremental build time increase 25%= ~35%, which is not good.

 

We’re building server platform. And we use --h= ash to speed up incremental build as described in https://gi= thub.com/BobCF/edk2/wiki/Incremental-Build

After upgrading to edk2-stable201908, none of AutoGe= n is skipped when I did an incremental build without any code change.<= /o:p>

 

Dig into the issue, it is caused by commit https://github.com/tianocore/edk2/commit/0e7e7a264cd80ab71ea0f9e9da2d0617d4= b539c4

From the code change logic, it seems like it require= both --hash and --binary-source to perform cache based incremen= tal build. However, when we only = have --hash in build flag, it is not functional.

 

 

Here’s a build time log retrieved from -y repo= rt.log.

 

        &nbs= p;            &= nbsp;            &nb= sp;     201905 incremental |  201908 incremen= tal |      201905 clean |     = 201908 clean 

Build Duration:       =          00:03:44   =             &nb= sp;        00:04:40  &nbs= p;            &= nbsp;            00:= 07:12           &nbs= p;     00:06:19

AutoGen Duration:      &nbs= p;   00:02:40        &nbs= p;            &= nbsp;  00:03:15         &= nbsp;           &nbs= p;      00:04:28     &nbs= p;           00:03:0= 9

Make Duration:       &= nbsp;        00:00:36   &= nbsp;           &nbs= p;        00:00:39   = ;            &n= bsp;            00:0= 1:21            &nbs= p;    00:01:34

GenFds Duration:       = ;      00:00:27      = ;            &n= bsp;     00:00:28      &n= bsp;            = ;         00:01:22   = ;            &n= bsp; 00:01:18  

 

We could see the AutoGen Duration has almost no chan= ge between clean and incremental build in 201908.

 

Could we fix this?

 

Thanks,

Derek

 

--_000_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_-- --_004_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_ Content-Type: application/octet-stream; name="0001-Fix-the-hash-functionality-for-increamental-build.patch" Content-Description: 0001-Fix-the-hash-functionality-for-increamental-build.patch Content-Disposition: attachment; filename="0001-Fix-the-hash-functionality-for-increamental-build.patch"; size=23859; creation-date="Tue, 24 Sep 2019 08:02:47 GMT"; modification-date="Tue, 24 Sep 2019 08:02:47 GMT" Content-Transfer-Encoding: base64 RnJvbSAyNGYzMGE2YmZhMmNjMzFlYWI1OGY4Njk5ZTQ3NWEwMzI5ZmQ0NjU5IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBTdGV2ZW4gPHN0ZXZlbi5zaGlAaW50ZWwuY29tPgpEYXRlOiBU dWUsIDI0IFNlcCAyMDE5IDE1OjU1OjU2ICswODAwClN1YmplY3Q6IFtQQVRDSF0gRml4IHRoZSAt LWhhc2ggZnVuY3Rpb25hbGl0eSBmb3IgaW5jcmVhbWVudGFsIGJ1aWxkCgpDdXJyZW50IC0taGFz aCBvcHRpb24gaGFzIG5vIGVmZmVjdCBhbmQgY2Fubm90IHNraXAgbW9kdWxlIGJ1aWxkCmluIHRo ZSBpbmNyZWFtZW50YWwgYnVpbGQuIFRoa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YXRhLmdQYWNr YWdlSGFzaFtQa2cuUGFja2FnZU5hbWVdLmVuY29kZSgndXRmLTgnKSkNCi0NCi0gICAgICAgICMg QWRkIExpYnJhcnkgaGFzaA0KLSAgICAgICAgaWYgc2VsZi5MaWJyYXJ5QXV0b0dlbkxpc3Q6DQot ICAgICAgICAgICAgZm9yIExpYiBpbiBzb3J0ZWQoc2VsZi5MaWJyYXJ5QXV0b0dlbkxpc3QsIGtl eT1sYW1iZGEgeDogeC5OYW1lKToNCi0gICAgICAgICAgICAgICAgaWYgTGliLk5hbWUgbm90IGlu IEdsb2JhbERhdGEuZ01vZHVsZUhhc2hbc2VsZi5BcmNoXToNCi0gICAgICAgICAgICAgICAgICAg IExpYi5HZW5Nb2R1bGVIYXNoKCkNCi0gICAgICAgICAgICAgICAgbS51cGRhdGUoR2xvYmFsRGF0 YS5nTW9kdWxlSGFzaFtzZWxmLkFyY2hdW0xpYi5OYW1lXS5lbmNvZGUoJ3V0Zi04JykpDQotDQot ICAgICAgICAjIEFkZCBNb2R1bGUgc2VsZg0KLSAgICAgICAgd2l0aCBvcGVuKHN0cihzZWxmLk1l dGFGaWxlKSwgJ3JiJykgYXMgZjoNCi0gICAgICAgICAgICBDb250ZW50ID0gZi5yZWFkKCkNCi0g ICAgICAgIG0udXBkYXRlKENvbnRlbnQpDQotDQotICAgICAgICAjIEFkZCBNb2R1bGUncyBzb3Vy Y2UgZmlsZXMNCi0gICAgICAgIGlmIHNlbGYuU291cmNlRmlsZUxpc3Q6DQotICAgICAgICAgICAg Zm9yIEZpbGUgaW4gc29ydGVkKHNlbGYuU291cmNlRmlsZUxpc3QsIGtleT1sYW1iZGEgeDogc3Ry KHgpKToNCi0gICAgICAgICAgICAgICAgZiA9IG9wZW4oc3RyKEZpbGUpLCAncmInKQ0KLSAgICAg ICAgICAgICAgICBDb250ZW50ID0gZi5yZWFkKCkNCi0gICAgICAgICAgICAgICAgZi5jbG9zZSgp DQotICAgICAgICAgICAgICAgIG0udXBkYXRl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orDQorICAgICAgICAjIEVhcmx5IGV4aXQgZm9yIGxpYnJh cmllcyB0aGF0IGhhdmVuJ3QgeWV0IGZpbmlzaGVkIGJ1aWxkaW5nDQorICAgICAgICBIYXNoRmls ZSA9IHBhdGguam9pbihzZWxmLkJ1aWxkRGlyLCBzZWxmLk5hbWUgKyAiLmhhc2giKQ0KKyAgICAg ICAgaWYgbm90IG9zLnBhdGguZXhpc3RzKEhhc2hGaWxlKToNCisgICAgICAgICAgICByZXR1cm4g RmFsc2UNCisNCisgICAgICAgIHdpdGggb3BlbihIYXNoRmlsZSwgInJiIikgYXMgZjoNCisgICAg ICAgICAgICBpZiBzZWxmLkdlbk1vZHVsZUluY3JtdGxIYXNoKGdEaWN0KSA9PSBmLnJlYWQoKToN CisgICAgICAgICAgICAgICAgSW5jcm10bENhY2hlSGl0ID0gVHJ1ZQ0KKyAgICAgICAgICAgIGVs c2U6DQorICAgICAgICAgICAgICAgIEluY3JtdGxDYWNoZUhpdCA9IEZhbHNlDQorDQorICAgICAg ICBpZiBJbmNybXRsQ2FjaGVIaXQ6DQorICAgICAgICAgICAgd2l0aCBHbG9iYWxEYXRhLmNhY2hl X2xvY2s6DQorICAgICAgICAgICAgICAgIElSID0gZ0RpY3RbKHNlbGYuTWV0YUZpbGUuUGF0aCwg c2VsZi5BcmNoKV0NCisgICAgICAgICAgICAgICAgSVIuSW5jcm10bENhY2hlSGl0ID0gSW5jcm10 bENhY2hlSGl0DQorICAgICAgICAgICAgICAgIGdEaWN0WyhzZWxmLk1ldGFGaWxlLlBhdGgsIHNl bGYuQXJjaCldID0gSVINCisgICAgICAgICAgICBwcmludCgiW2hhc2ggaGl0XToiLCBzZWxmLk1l dGFGaWxlLlBhdGgsIHNlbGYuQXJjaCkNCisgICAgICAgIHJldHVybiBJbmNybXRsQ2FjaGVIaXQN CisNCiAgICAgIyMgRGVjaWRlIHdoZXRoZXIgd2UgY2FuIHNraXAgdGhlIGxlZnQgYXV0b2dlbiBh bmQgbWFrZSBw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ICAgICAgICAgICAgICAgICAgZm9yIFBrZ05hbWUgaW4gR2xv YmFsRGF0YS5nUGFja2FnZUhhc2gua2V5cygpOg0KICAgICAgICAgICAgICAgICAgICAgICAgIEds b2JhbERhdGEuZ0NhY2hlSVJbKFBrZ05hbWUsICdQYWNrYWdlSGFzaCcpXSA9IEdsb2JhbERhdGEu Z1BhY2thZ2VIYXNoW1BrZ05hbWVdDQpAQCAtMTg3Miw2ICsxODM2LDEwIEBAIGNsYXNzIEJ1aWxk KCk6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLkhhc2hTa2lwTW9k dWxlcy5hcHBlbmQoTWEpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWRr TG9nZ2VyLnF1aWV0KCJjYWNoZSBoaXQ6ICVzWyVzXSIgJSAoTWEuTWV0YUZpbGUuUGF0aCwgTWEu QXJjaCkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxpZiBHbG9iYWxEYXRhLmdVc2VIYXNoQ2FjaGUg YW5kIHNlbGYuVGFyZ2V0IGluIFtOb25lLCAiIiwgImFsbCJdOg0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgTWEuR2VuTW9kdWxlSW5jcm10bEhhc2goR2xvYmFsRGF0YS5nQ2FjaGVJ UikNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIE1hLkNhblNraXBieUluY3Jt dGxDYWNoZShHbG9iYWxEYXRhLmdDYWNoZUlSKToNCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBjb250aW51ZQ0KIA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIE5v dCB0byBhdXRvLWdlbiBmb3IgdGFyZ2V0cyAnY2xlYW4nLCAnY2xlYW5saWInLCAnY2xlYW5hbGwn LCAncnVuJywgJ2ZkcycNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgc2VsZi5UYXJn ZXQgbm90IGluIFsnY2xlYW4nLCAnY2xlYW5saWInLCAnY2xlYW5hbGwnLCAncnVuJywgJ2Zkcydd Og0KQEAgLTE5MDUsOCArMTg3Myw2IEBAIGNsYXNzIEJ1aWxkKCk6CiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgTWEuUHJpbnRGaXJzdE1ha2VDYWNoZU1pc3NGaWxlKEds b2JhbERhdGEuZ0NhY2hlSVIpDQogDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYu QnVpbGRNb2R1bGVzLmFwcGVuZChNYSkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBJ bml0aWFsaXplIGFsbCBtb2R1bGVzIGluIHRyYWNraW5nIHRvICdGQUlMJw0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICBHbG9iYWxEYXRhLmdNb2R1bGVCdWlsZFRyYWNraW5nW01hXSA9ICdG QUlMJw0KICAgICAgICAgICAgICAgICAgICAgc2VsZi5BdXRvR2VuVGltZSArPSBpbnQocm91bmQo KHRpbWUudGltZSgpIC0gQXV0b0dlblN0YXJ0KSkpDQogICAgICAgICAgICAgICAgICAgICBNYWtl U3RhcnQgPSB0aW1lLnRpbWUoKQ0KICAgICAgICAgICAgICAgICAgICAgZm9yIE1hIGluIHNlbGYu QnVpbGRNb2R1bGVzOg0KQEAgLTE5MTcsNyArMTg4Myw2IEBAIGNsYXNzIEJ1aWxkKCk6CiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIyB3ZSBuZWVkIGEgZnVsbCB2ZXJzaW9uIG9mIG1ha2Vm aWxlIGZvciBwbGF0Zm9ybQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFeGl0RmxhZy5z ZXQoKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCdWlsZFRhc2suV2FpdEZvckNvbXBs ZXRlKCkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbnZhbGlkYXRlSGFzaCgp DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBhLkNyZWF0ZU1ha2VGaWxlKEZhbHNlKQ0K ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFZGtMb2dnZXIuZXJyb3IoImJ1aWxkIiwgQlVJ TERfRVJST1IsICJGYWlsZWQgdG8gYnVpbGQgbW9kdWxlIiwgRXh0cmFEYXRhPUdsb2JhbERhdGEu Z0J1aWxkaW5nTW9kdWxlKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICMgU3RhcnQgdGFzayBz Y2hlZHVsZXINCkBAIC0xOTI3LDcgKzE4OTIsNiBAQCBjbGFzcyBCdWlsZCgpOgogICAgICAgICAg ICAgICAgICAgICAjIGluIGNhc2UgdGhlcmUncyBhbiBpbnRlcnJ1cHRpb24uIHdlIG5lZWQgYSBm dWxsIHZlcnNpb24gb2YgbWFrZWZpbGUgZm9yIHBsYXRmb3JtDQogICAgICAgICAgICAgICAgICAg ICBQYS5DcmVhdGVNYWtlRmlsZShGYWxzZSkNCiAgICAgICAgICAgICAgICAgICAgIGlmIEJ1aWxk VGFzay5IYXNFcnJvcigpOg0KLSAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuaW52YWxpZGF0 ZUhhc2goKQ0KICAgICAgICAgICAgICAgICAgICAgICAgIEVka0xvZ2dlci5lcnJvcigiYnVpbGQi LCBCVUlMRF9FUlJPUiwgIkZhaWxlZCB0byBidWlsZCBtb2R1bGUiLCBFeHRyYURhdGE9R2xvYmFs RGF0YS5nQnVpbGRpbmdNb2R1bGUpDQogICAgICAgICAgICAgICAgICAgICBzZWxmLk1ha2VUaW1l ICs9IGludChyb3VuZCgodGltZS50aW1lKCkgLSBNYWtlU3RhcnQpKSkNCiANCkBAIC0xOTQwLDcg KzE5MDQsNiBAQCBjbGFzcyBCdWlsZCgpOgogICAgICAgICAgICAgICAgIHNlbGYuQnVpbGRNb2R1 bGVzID0gW10NCiAg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GF0YS5nQmluQ2FjaGVTb3VyY2U6DQorICAgICAgICAgICAgaWYg R2xvYmFsRGF0YS5nVXNlSGFzaENhY2hlOg0KICAgICAgICAgICAgICAgICBmb3IgTWEgaW4gVG90 YWxNb2R1bGVzOg0KKyAgICAgICAgICAgICAgICAgICAgaWYgKE1hLk1ldGFGaWxlLlBhdGgsIE1h LkFyY2gpIGluIEdsb2JhbERhdGEuZ0NhY2hlSVIgYW5kIFwNCisgICAgICAgICAgICAgICAgICAg ICAgICBHbG9iYWxEYXRhLmdDYWNoZUlSWyhNYS5NZXRhRmlsZS5QYXRoLCBNYS5BcmNoKV0uSW5j cm10bENhY2hlSGl0Og0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLkhhc2hTa2lw TW9kdWxlcy5hcHBlbmQoTWEpDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVl DQogICAgICAgICAgICAgICAgICAgICBpZiAoTWEuTWV0YUZpbGUuUGF0aCwgTWEuQXJjaCkgaW4g R2xvYmFsRGF0YS5nQ2FjaGVJUiBhbmQgXA0KICAgICAgICAgICAgICAgICAgICAgICAgIEdsb2Jh bERhdGEuZ0NhY2hlSVJbKE1hLk1ldGFGaWxlLlBhdGgsIE1hLkFyY2gpXS5QcmVNYWtlQ2FjaGVI aXQ6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuSGFzaFNraXBNb2R1bGVzLmFw cGVuZChNYSkNCkBAIC0yMjI0LDcgKzIxODcsOSBAQCBjbGFzcyBCdWlsZCgpOgogICAgICAgICAg ICAgICAgICAgICBmb3IgSVIgaW4gR2xvYmFsRGF0YS5nQ2FjaGVJUi5rZXlzKCk6DQogICAgICAg ICAgICAgICAgICAgICAgICAgaWYgJ1BsYXRmb3JtSGFzaCcgaW4gSVIgb3IgJ1BhY2thZ2VIYXNo JyBpbiBJUjoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUNCi0gICAgICAg ICAgICAgICAgICAgICAgICBpZiBHbG9iYWxEYXRhLmdDYWNoZUlSW0lSXS5QcmVNYWtlQ2FjaGVI aXQgb3IgR2xvYmFsRGF0YS5nQ2FjaGVJUltJUl0uTWFrZUNhY2hlSGl0Og0KKyAgICAgICAgICAg ICAgICAgICAgICAgIGlmIEdsb2JhbERhdGEuZ0NhY2hlSVJbSVJdLlByZU1ha2VDYWNoZUhpdCBv ciBcDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgR2xvYmFsRGF0YS5nQ2FjaGVJUltJUl0u TWFrZUNhY2hlSGl0IG9yIFwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICBHbG9iYWxEYXRh LmdDYWNoZUlSW0lSXS5JbmNybXRsQ2FjaGVIaXQ6DQogICAgICAgICAgICAgICAgICAgICAgICAg ICAgIENhY2hlSGl0TWEuYWRkKElSKQ0KICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2U6DQog ICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgVGhlcmUgbWlnaHQgYmUgYmluYXJ5IG1vZHVs ZSBvciBtb2R1bGUgd2hpY2ggaGFzIC5pbmMgZmlsZXMsIG5vdCBjb3VudCBmb3IgY2FjaGUgbWlz cw0KQEAgLTIyNDIsNyArMjIwNyw2IEBAIGNsYXNzIEJ1aWxkKCk6CiAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIyB3ZSBuZWVkIGEgZnVsbCB2ZXJzaW9uIG9mIG1ha2VmaWxlIGZvciBwbGF0 Zm9ybQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFeGl0RmxhZy5zZXQoKQ0KICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBCdWlsZFRhc2suV2FpdEZvckNvbXBsZXRlKCkNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5pbnZhbGlkYXRlSGFzaCgpDQogICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFBhLkNyZWF0ZU1ha2VGaWxlKEZhbHNlKQ0KICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBFZGtMb2dnZXIuZXJyb3IoImJ1aWxkIiwgQlVJTERfRVJST1IsICJG YWlsZWQgdG8gYnVpbGQgbW9kdWxlIiwgRXh0cmFEYXRhPUdsb2JhbERhdGEuZ0J1aWxkaW5nTW9k dWxlKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICMgU3RhcnQgdGFzayBzY2hlZHVsZXINCkBA IC0yMjUyLDcgKzIyMTYsNiBAQCBjbGFzcyBCdWlsZCgpOgogICAgICAgICAgICAgICAgICAgICAj IGluIGNhc2UgdGhlcmUncyBhbiBpbnRlcnJ1cHRpb24uIHdlIG5lZWQgYSBmdWxsIHZlcnNpb24g b2YgbWFrZWZpbGUgZm9yIHBsYXRmb3JtDQogDQogICAgICAgICAgICAgICAgICAgICBpZiBCdWls ZFRhc2suSGFzRXJyb3IoKToNCi0gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmludmFsaWRh dGVIYXNoKCkNCiAgICAgICAgICAgICAgICAgICAgICAgICBFZGtMb2dnZXIuZXJyb3IoImJ1aWxk IiwgQlVJTERfRVJST1IsICJGYWlsZWQgdG8gYnVpbGQgbW9kdWxlIiwgRXh0cmFEYXRhPUdsb2Jh bERhdGEuZ0J1aWxkaW5nTW9kdWxlKQ0KICAgICAgICAgICAgICAgICAgICAgc2VsZi5NYWtlVGlt ZSArPSBpbnQocm91bmQoKHRpbWUudGltZSgpIC0gTWFrZVN0YXJ0KSkpDQogDQpAQCAtMjI3NCw3 ICsyMjM3LDYgQEAgY2xhc3MgQnVpbGQoKToKICAgICAgICAgICAgICAgICAjIGhhcyBiZWVuIHNp Z25hbGVkLg0KICAgICAgICAgICAgICAgICAjDQogICAgICAgICAgICAgICAgIGlmIEJ1aWxkVGFz ay5IYXNFcnJvcigpOg0KLSAgICAgICAgICAgICAgICAgICAgc2VsZi5pbnZhbGlkYXRlSGFzaCgp DQogICAgICAgICAgICAgICAgICAgICBFZGtMb2dnZXIuZXJyb3IoImJ1aWxkIiwgQlVJTERfRVJS T1IsICJGYWlsZWQgdG8gYnVpbGQgbW9kdWxlIiwgRXh0cmFEYXRhPUdsb2JhbERhdGEuZ0J1aWxk aW5nTW9kdWxlKQ0KIA0KICAgICAgICAgICAgICAgICAjIENyZWF0ZSBNQVAgZmlsZSB3aGVuIExv YWQgRml4IEFkZHJlc3MgaXMgZW5hYmxlZC4NCkBAIC0yMzE1LDcgKzIyNzcsNiBAQCBjbGFzcyBC dWlsZCgpOgogICAgICAgICAgICAgICAgICAgICAjDQogICAgICAgICAgICAgICAgICAgICBzZWxm Ll9TYXZlTWFwRmlsZShNYXBCdWZmZXIsIFdhKQ0KICAgICAgICAgICAgICAgICBzZWxmLkNyZWF0 ZUd1aWRlZFNlY3Rpb25Ub29sc0ZpbGUoV2EpDQotICAgICAgICBzZWxmLmludmFsaWRhdGVIYXNo KCkNCiAgICAgIyMgR2VuZXJhdGUgR3VpZGVkU2VjdGlvblRvb2xzLnR4dCBpbiB0aGUgRlYgZGly ZWN0b3JpZXMuDQogICAgICMNCiAgICAgZGVmIENyZWF0ZUd1aWRlZFNlY3Rpb25Ub29sc0ZpbGUo c2VsZixXYSk6DQotLSAKMi4yMi4wLndpbmRvd3MuMQoK --_004_06C8AB66E78EE34A949939824ABE2B3140183293shsmsx102ccrcor_--