RFR: 8300052: PdhDll::PdhCollectQueryData and PdhLookupPerfNameByIndex will never be NULL [v2]

Julian Waters jwaters at openjdk.org
Mon Jan 16 04:00:43 UTC 2023


> 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

Julian Waters has updated the pull request incrementally with one additional commit since the last revision:

  Change Checks

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/11968/files
  - new: https://git.openjdk.org/jdk/pull/11968/files/d3c8d639..41068a05

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11968&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11968&range=00-01

  Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/11968.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/11968/head:pull/11968

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


More information about the hotspot-dev mailing list