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

[LLVM Analyzer][DQM] Fix dead assignments #46247

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

iarspider
Copy link
Contributor

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2024

cms-bot internal usage

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2024

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2024

A new Pull Request was created by @iarspider for master.

It involves the following packages:

  • DQM/BeamMonitor (dqm, db)
  • DQM/DTMonitorClient (dqm)
  • DQM/DTMonitorModule (dqm)
  • DQM/L1TMonitorClient (dqm)
  • DQM/Physics (dqm)
  • DQM/SiPixelMonitorClient (dqm)
  • DQM/SiPixelMonitorCluster (dqm)
  • DQM/SiPixelMonitorDigi (dqm)
  • DQM/SiPixelMonitorRawData (dqm)
  • DQM/SiPixelMonitorTrack (dqm)
  • DQM/SiStripCommissioningAnalysis (dqm)
  • DQM/SiStripCommissioningClients (dqm)
  • DQM/SiStripMonitorSummary (dqm)
  • DQMOffline/Hcal (dqm)
  • DQMOffline/JetMET (dqm)
  • DQMOffline/Muon (dqm)
  • DQMOffline/Trigger (dqm)
  • DQMServices/Components (dqm)
  • DQMServices/Core (dqm)

@antoniovagnerini, @atpathak, @cmsbuild, @consuegs, @francescobrivio, @nothingface0, @perrotta, @rvenditti, @syuvivida, @tjavaid can you please review it and eventually sign? Thanks.
@Fedespring, @HuguesBrun, @JanChyczynski, @PonIlya, @abbiendi, @abdoulline, @ahinzmann, @arossi83, @barvic, @battibass, @bellan, @bsunanda, @calderona, @cericeci, @denizsun, @erikbutz, @fioriNTU, @francescobrivio, @gkasieczka, @idebruyn, @jandrea, @jdamgov, @jdolen, @jhgoh, @mariadalfonso, @missirol, @mmarionncern, @mmusich, @mtosi, @nhanvtran, @ptcox, @rappoccio, @rociovilar, @rsreds, @salimcerci, @schoef, @seemasharmafnal, @sroychow, @threus, @trocino, @venturia, @yuanchao this is something you requested to watch as well.
@antoniovilela, @mandrenguyen, @rappoccio, @sextonkennedy you are the release manager for this.

cms-bot commands are listed here

@@ -340,7 +340,6 @@ void QcdPhotonsDQM::analyze(const Event& iEvent, const EventSetup& iSetup) {
float photon_eta = -9.0;
float photon_phi = -9.0;
bool photon_passPhotonID = false;
bool found_lead_pho = false;
Copy link
Contributor Author

@iarspider iarspider Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are exactly three uses of this variable: declaration here, check on line 392 and setting to true on line 393

@@ -1138,6 +1138,7 @@ void SiPixelDigiSource::buildStructure(const edm::EventSetup& iSetup) {
uint32_t id = detId();
SiPixelDigiModule* theModule = new SiPixelDigiModule(id, ncols, nrows);

/*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed.

MonitorElement* NumberOfMatches;
MonitorElement* NumberOfEvents;

//dummy = iBooker.bookFloat("dummy");
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As far as I can tell, bookFloat doesn't have any side-effects, so the result of all these calls is unused.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please remove

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iarspider , looks like bookFloat calls bookME which has some side-effects on the store. So may be we need these bookFloat calls ... @cms-sw/dqm-l2 should know better though

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@iarspider , looks like bookFloat calls bookME which has some side-effects on the store. So may be we need these bookFloat calls ... @cms-sw/dqm-l2 should know better though

Not in this case, I think. The onbooking function defaults to NOOP ("functor to be passed as a default argument that does not do anything."), and the makeobject function that is passed to bookME explicitly returns nullptr. But I agree that DQM L2s should know better.

@@ -62,25 +62,25 @@ class DQMStoreStatsSubfolder {
++totalHistos_;
totalBins_ += nBins;
totalEmptyBins_ += nEmptyBins;
totalMemory_ += (nBins *= sizeof(float));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nBins is passed by value, makes no sense to modify it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indeed

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Oct 4, 2024

-1

Failed Tests: Build ClangBuild
Size: This PR adds an extra 188KB to repository
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-803098/41955/summary.html
COMMIT: 0f39692
CMSSW: CMSSW_14_2_X_2024-10-03-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week1/cms-sw/cmssw/46247/41955/install.sh to create a dev area with all the needed externals and cmssw changes.

Build

I found compilation warning when building: See details on the summary page.

Clang Build

I found compilation warning while trying to compile with clang. Command used:

USER_CUDA_FLAGS='--expt-relaxed-constexpr' USER_CXXFLAGS='-Wno-register -fsyntax-only' scram build -k -j 32 COMPILER='llvm compile'

See details on the summary page.

@iarspider
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46247/42319

@cmsbuild
Copy link
Contributor

Pull request #46247 was updated. @antoniovagnerini, @atpathak, @consuegs, @francescobrivio, @nothingface0, @perrotta, @rvenditti, @syuvivida, @tjavaid can you please check and sign again.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46247/42321

@cmsbuild
Copy link
Contributor

Pull request #46247 was updated. @antoniovagnerini, @atpathak, @cmsbuild, @consuegs, @francescobrivio, @nothingface0, @perrotta, @rvenditti, @syuvivida, @tjavaid can you please check and sign again.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-46247/42324

@cmsbuild
Copy link
Contributor

Pull request #46247 was updated. @antoniovagnerini, @atpathak, @cmsbuild, @consuegs, @francescobrivio, @nothingface0, @perrotta, @rvenditti, @syuvivida, @tjavaid can you please check and sign again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants