Integrated: 8300052: PdhDll::PdhCollectQueryData and PdhLookupPerfNameByIndex will never be NULL

Julian Waters jwaters at openjdk.org
Mon Jan 16 06:11:15 UTC 2023


On Thu, 12 Jan 2023 15:21:37 GMT, Julian Waters <jwaters at openjdk.org> wrote:

> Both PdhDll::PdhCollectQueryData and PdhLookupPerfNameByIndex are concrete definitions and not pointers to executable code (Former is defined by us and the latter is a macro that expands into a concrete declaration), so it makes no sense to check if they will be NULL. The code fails to compile on Windows before this commit when gcc has warnings as errors enabled (-Waddress in this case)
> 
> In the case of PdhCollectQueryData I'm assuming the check actually intended to check for _PdhCollectQueryData with the leading underscore, which is actually a pointer and can be NULL. Do correct me if I'm wrong and point me to what the appropriate check would be otherwise

This pull request has now been integrated.

Changeset: 12edd6f9
Author:    Julian Waters <jwaters at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/12edd6f922195f193659814d6c37c361c83e6797
Stats:     3 lines in 1 file changed: 0 ins; 0 del; 3 mod

8300052: PdhDll::PdhCollectQueryData and PdhLookupPerfNameByIndex will never be NULL

Reviewed-by: dholmes

-------------

PR: https://git.openjdk.org/jdk/pull/11968


More information about the hotspot-runtime-dev mailing list