From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4002:c09::236; helo=mail-yb0-x236.google.com; envelope-from=prabinca4u@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-yb0-x236.google.com (mail-yb0-x236.google.com [IPv6:2607:f8b0:4002:c09::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id B357121BADAB2 for ; Fri, 3 Aug 2018 22:17:15 -0700 (PDT) Received: by mail-yb0-x236.google.com with SMTP id s1-v6so3463716ybk.3 for ; Fri, 03 Aug 2018 22:17:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=0EwIiplP0Yxa1hnF8apsVIYybiDc/1xqq5pQzbTYA4s=; b=McyAP8PMpKHO0ySRbqAyw053lccTFdwBvdnnKcBmW2AA+3y/s7pJhQlVuVbwPoX+oO XxIuljJ1eKdLcljnIKwimSJhnwHapybMZ7HuE3jqskL0KEATPcOoM0uY0IBLNAJbYzfc rV0qs2tKEz46WLYvCdvqBqP28UoJuPoxYroIN7shIr6MZaVB+N3Ck0pGbrd3kOPVnnnN lAj6dAkQRVyPuqJbJvCtXs2Er+v+UG13MljypYo0ofORiPL25+AYQv8IaqlovETN/yII sa5MMWEiK8JvJhq5ASN73IKiBJSsNRv3UUZQZy739GRdBheduWFygDGXFIdkjxg9X1++ O5nQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=0EwIiplP0Yxa1hnF8apsVIYybiDc/1xqq5pQzbTYA4s=; b=EJc+DYgiSmNUPkIXPsI16r+4WvTeENx/thB5ONdVIuHSmOF3BN7i5PG+iYan0EgwqU cbpEKhRz2QFT2sVHDMHFUvx6MYpa4Gq3q0+doVH+KnlBK3ZE4kAacDJbAqEm8V9zD/Ex xMq/B8ya+4sM5xDgy1ZYBMU+tSFL0RAqrS096p4bS2Hg3MaGJIiA/wher5mi3Qvzxzt+ ew/UaDm6oc82rIs0HQ0vGxKVTexHo9RxMJMydEKigmdiVKd7EEawOCoxhDJaHnK9Q2lT ulG/kmlmX4+AsLOGeLMx4MbdSjMDIOo1xik0ZYa6/MV6DpHGxF0oh6fMziiDwleiuPFL YsFQ== X-Gm-Message-State: AOUpUlFu2nvt1BkywuUQx4Hk5S+QJmOG3TDWdgfyUBtz5HJRdktLzLME x9umyz/eSGrLg7svT32AZ3W2FYG2d4DS2lSzFuU= X-Google-Smtp-Source: AAOMgpe6FHXrouV+nZldK2JODtgX4zaf2RiTDMi3bwUCn+aqyBTYjv7cJVdtp9jI+4ZziAwrSHDsVfwJAiPRZvuO0bM= X-Received: by 2002:a25:35c4:: with SMTP id c187-v6mr3451151yba.283.1533359834518; Fri, 03 Aug 2018 22:17:14 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a25:c341:0:0:0:0:0 with HTTP; Fri, 3 Aug 2018 22:17:14 -0700 (PDT) In-Reply-To: <1deaed58-5098-aa30-b401-f415a034957d@redhat.com> References: <8E875131-258C-4F21-B104-EB36CE970701@gmail.com> <1deaed58-5098-aa30-b401-f415a034957d@redhat.com> From: prabin ca Date: Sat, 4 Aug 2018 10:47:14 +0530 Message-ID: To: Laszlo Ersek Cc: edk2-devel@lists.01.org X-Content-Filtered-By: Mailman/MimeDel 2.1.27 Subject: Re: PerformancePkg on multiple platform X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 04 Aug 2018 05:17:16 -0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Laszlo, Thank you for your valid input, Its really help full for me. I will look in the " A Tour Beyond BIOS Implementing Profiling in with EDK II" with your points. have a nice day. On Fri, Aug 3, 2018 at 11:47 PM, Laszlo Ersek wrote: > Hi Prabin, > > On 08/03/18 09:29, prabin ca wrote: > > Hi Team, > > > > I=E2=80=99m new to uefi and edk. Currently I=E2=80=99m trying to get pe= rformance of my > dxe driver using PerformancePkg of EDK source code. > > > > I=E2=80=99m using perf_start and perf_end T respected check points, it= =E2=80=99s hot > build and tested well in 2/3 platform. It=E2=80=99s giving proper respons= e. > > > > But when I=E2=80=99m Checking with multiple platform, in some of platfo= rms it=E2=80=99s > not working and got hang in uefi she=E2=80=99ll itself. > > > > Please help me to resolve asap, it will be really helpful. > > I can only give you some hints, because thus far I have also failed to > figure out how performance measurements should be enabled for a platform > from scratch. > > Earlier I thought that an interested platform should include modules > from PerformancePkg. I got some good results that way; however: > > - it wouldn't work for AARCH64, and so I filed > > > - ultimately PerformancePkg was removed in commit 922c1e94e4bb > completely. (And for that reason I now closed TianoCore#679 as > WONTFIX.) > > Commit 922c1e94e4bb doesn't really give pointers for enabling > performance measurements in a platform -- it refers the user to the DP > shell command instead of the standalone DP application, but that's only > for displaying the stats, not for recording them. > > One document where I found information is the Intel whitepaper > > A Tour Beyond BIOS > Implementing Profiling in with EDK II > > (just google it). "Part III =E2=80=93 Performance Profile" is relevant. > > The first section of that talks about enabling ACPI FPDT (ACPI Firmware > Performance Data Table) support in edk2, for exposing firmware > performance data to the OS. Again, that's not about *recording* the stats= . > > The second section of the same chapter seems to describe how stats can > be recorded however. AIUI, the DXE Core can provide the PERFORMANCE[_EX] > protocols, if the DxeCorePerformanceLib instance is linked into it by > the platform DSC file. In turn DXE modules can send measurements to the > protocol via the PerformanceLib APIs / DxePerformanceLib instance. > > In fact, the relevant library INF files have good documentation, we just > have to know what to look at. > > Recording stats in the PEI phase, via HOBs: > - MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf > > Recording stats in the DXE phase (protocol provider and consumer): > - MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf > - MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf > > Recording stats in SMM (protocol provider and consumer): > - MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf > - MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf > > Fetching the collected stats (for display or otherwise): > - MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf > > "Do nothing" library instance for all module types: > - MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf > > > Now obviously this doesn't explain why it works for you on some > platforms and why it doesn't on others. You haven't shared much > information about the platforms in question. I can make one guess: if > the performance protocol provided by the platform's DXE Core > (DxeCorePerformanceLib) is incompatible with the DxePerformanceLib > instance that is linked into your DXE driver, then communication between > them will likely fail. > > To my understanding, the performance protocol is not standard (PI or > UEFI), so it's likely best if you build your DXE driver together with > the DXE Core, on all platforms that you want to check. It's probably > unsafe to link a DXE driver against DxePerformanceLib (rather than > BasePerformanceLibNull) and run it on a random platform. > > Hopefully this helps a little. > Laszlo >