Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EventSetupRecord::get checker #10

Merged
merged 1 commit into from Mar 16, 2021

Conversation

gartung
Copy link
Member

@gartung gartung commented Mar 9, 2021

This clang-tidy checker will flag all uses up EventSetupRecord::get with a deprecated warning, Links to wiki pages with directions on replacement with EventSetup::getHandle(ESGetToken<>) are also printed.
Resolves cms-sw/framework-team#69

@gartung gartung changed the title Initial try at EventSetupRecord::get checker WIP:: Initial try at EventSetupRecord::get checker Mar 9, 2021
@cmsbuild
Copy link

cmsbuild commented Mar 9, 2021

A new Pull Request was created by @gartung (Patrick Gartung) for branch cms/release/10.x/92d5c1b.

@cmsbuild, @smuzaffar, @mrodozov can you please review it and eventually sign? Thanks.
cms-bot commands are listed here

@gartung
Copy link
Member Author

gartung commented Mar 9, 2021

plase test

@mrodozov
Copy link

mrodozov commented Mar 9, 2021

we are currently getting 11.1 in
cms-sw/cmsdist#6691
it's almost done except two unit tests to be adjusted.
llvm builds, you can rebase this against
https://github.com/cms-externals/llvm-project/tree/cms/release%2F11.x%2F1fdec59

@cmsbuild
Copy link

cmsbuild commented Mar 9, 2021

Pull request #10 was updated.

@cmsbuild
Copy link

cmsbuild commented Mar 9, 2021

Pull request #10 was updated.

@cmsbuild
Copy link

cmsbuild commented Mar 9, 2021

Pull request #10 was updated.

5 similar comments
@cmsbuild
Copy link

cmsbuild commented Mar 9, 2021

Pull request #10 was updated.

@cmsbuild
Copy link

cmsbuild commented Mar 9, 2021

Pull request #10 was updated.

@cmsbuild
Copy link

Pull request #10 was updated.

@cmsbuild
Copy link

Pull request #10 was updated.

@cmsbuild
Copy link

Pull request #10 was updated.

@cmsbuild
Copy link

Pull request #10 was updated.

@gartung gartung changed the title WIP:: Initial try at EventSetupRecord::get checker Add EventSetupRecord::get checker Mar 12, 2021
@gartung
Copy link
Member Author

gartung commented Mar 12, 2021

Please test

@gartung
Copy link
Member Author

gartung commented Mar 12, 2021

abort

@cmsbuild
Copy link

Pull request #10 was updated.

@gartung
Copy link
Member Author

gartung commented Mar 12, 2021

please test

@cmsbuild
Copy link

-1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b70eeb/13472/summary.html
COMMIT: 18f656c
CMSSW: CMSSW_11_3_X_2021-03-12-1100/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-externals/llvm-project/10/13472/install.sh to create a dev area with all the needed externals and cmssw changes.

External Build

I found compilation error when building:

/build/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/slc7_amd64_gcc900/external/llvm/10.0.0-f4e43475a52f131bbd8e74e1681e48dd/llvm-10.0.0-4b3acf7d70558fefca729efe381e3900da4591dd/clang/tools/include-what-you-use/iwyu.cc:3634:50:   required from here
/build/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/slc7_amd64_gcc900/external/llvm/10.0.0-f4e43475a52f131bbd8e74e1681e48dd/llvm-10.0.0-4b3acf7d70558fefca729efe381e3900da4591dd/clang/tools/include-what-you-use/iwyu.cc:2042:5: warning: enumeration value 'CK_LValueToRValueBitCast' not handled in switch [-Wswitch]
/build/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/slc7_amd64_gcc900/external/llvm/10.0.0-f4e43475a52f131bbd8e74e1681e48dd/llvm-10.0.0-4b3acf7d70558fefca729efe381e3900da4591dd/clang/tools/include-what-you-use/iwyu.cc:2042:5: warning: enumeration value 'CK_FixedPointToIntegral' not handled in switch [-Wswitch]
/build/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/BUILD/slc7_amd64_gcc900/external/llvm/10.0.0-f4e43475a52f131bbd8e74e1681e48dd/llvm-10.0.0-4b3acf7d70558fefca729efe381e3900da4591dd/clang/tools/include-what-you-use/iwyu.cc:2042:5: warning: enumeration value 'CK_IntegralToFixedPoint' not handled in switch [-Wswitch]
ninja: build stopped: subcommand failed.
error: Bad exit status from /build/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/tmp/rpm-tmp.66hS09 (%build)


RPM build errors:
Macro %rpmbuild_libdir defined but not used within scope
Bad exit status from /build/cmsbld/jenkins/workspace/ib-run-pr-tests/testBuildDir/tmp/rpm-tmp.66hS09 (%build)


@gartung
Copy link
Member Author

gartung commented Mar 15, 2021

@mrodozov @smuzaffar The build failure is unrelated to this pull request. Do I need to merge in another branch?

@smuzaffar
Copy link

@gartung , cms/release/11.x/1fdec59 is not yet in IB. We are in process of updating to llvm 11.1. hopefully in a day or so we will integrate it and then you can test this or you can test it with cms-sw/cmsdist#6691 (which also include newer iwyu)

@gartung
Copy link
Member Author

gartung commented Mar 15, 2021

please test with cms-sw/cmsdist#6691

@gartung
Copy link
Member Author

gartung commented Mar 15, 2021

Some unit tests are failing but I assume that is because of missing updates to other packages that depend on llvm/clang that Mircho made on the CMSDIST PR.

@cmsbuild
Copy link

-1

Failed Tests: UnitTests
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-b70eeb/13526/summary.html
COMMIT: 18f656c
CMSSW: CMSSW_11_3_X_2021-03-14-2300/slc7_amd64_gcc900
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-externals/llvm-project/10/13526/install.sh to create a dev area with all the needed externals and cmssw changes.

Unit Tests

I found errors in the following unit tests:

---> test testLLVMLite had ERRORS
---> test test-clang-tidy had ERRORS

Comparison Summary

Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 37
  • DQMHistoTests: Total histograms compared: 2635087
  • DQMHistoTests: Total failures: 6
  • DQMHistoTests: Total nulls: 1
  • DQMHistoTests: Total successes: 2635058
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: -0.004 KiB( 36 files compared)
  • DQMHistoSizes: changed ( 312.0 ): -0.004 KiB MessageLogger/Warnings
  • Checked 155 log files, 37 edm output root files, 37 DQM output files

@smuzaffar
Copy link

+externals
looks good, unit tests failure are already fixed.

@cmsbuild
Copy link

This pull request is fully signed and it will be integrated in one of the next cms/release/11.x/1fdec59 IBs (but tests are reportedly failing). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

smuzaffar added a commit to cms-sw/cmsdist that referenced this pull request Mar 16, 2021
fwyzard pushed a commit that referenced this pull request Aug 31, 2021
This patch implemented TTI.IntImmCost() properly.
Each BPF insn has 32bit immediate space, so for any immediate
which can be represented as 32bit signed int, the cost
is technically free. If an int cannot be presented as
a 32bit signed int, a ld_imm64 instruction is needed
and a TCC_Basic is returned.

This change is motivated when we observed that
several bpf selftests failed with latest llvm trunk, e.g.,
  #10/16 strobemeta.o:FAIL
  #10/17 strobemeta_nounroll1.o:FAIL
  #10/18 strobemeta_nounroll2.o:FAIL
  #10/19 strobemeta_subprogs.o:FAIL
  llvm#96 snprintf_btf:FAIL

The reason of the failure is due to that
SpeculateAroundPHIsPass did aggressive transformation
which alters control flow for which currently verifer
cannot handle well. In llvm12, SpeculateAroundPHIsPass
is not called.

SpeculateAroundPHIsPass relied on TTI.getIntImmCost()
and TTI.getIntImmCostInst() for profitability
analysis. This patch implemented TTI.getIntImmCost()
properly for BPF backend which also prevented
transformation which caused the above test failures.

Differential Revision: https://reviews.llvm.org/D96448

(cherry picked from commit a260ae7)
@gartung gartung deleted the gartung-esrgetcheck branch June 3, 2023 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants