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

Improve RootHandlers #23186

Merged
merged 4 commits into from May 11, 2018
Merged

Improve RootHandlers #23186

merged 4 commits into from May 11, 2018

Conversation

kpedro88
Copy link
Contributor

Two changes:

  1. Technical modification to reduce code duplication and make it easier to add specific messages to be downgraded.
  2. Moderate refactoring to allow the use of ignoreWarningsWhileDoing() with any severity level (not just kWarning).

These changes were inspired by issues I found while integrating GeantV with CMSSW.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @kpedro88 (Kevin Pedro) for master.

It involves the following packages:

FWCore/Services
FWCore/Utilities

@cmsbuild, @smuzaffar, @Dr15Jones can you please review it and eventually sign? Thanks.
@makortel, @felicepantaleo, @wddgit, @Martin-Grunewald this is something you requested to watch as well.
@davidlange6, @slava77, @fabiocos you are the release manager for this.

cms-bot commands are listed here

@kpedro88
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 10, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/27899/console Started: 2018/05/10 22:15

(el_location.find("CINTTypedefBuilder::Setup")!= std::string::npos) and
(el_message.find("possible entries are in use!") != std::string::npos))) {
el_severity = SeverityLevel::kInfo;
std::vector<std::string> in_message = {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is requiring the construction of this vector each time RootErrorHandlerImpl is called. Move this outside of the function and declare it const.
Do this for all the std::vector<std::string>.

Copy link
Contributor

Choose a reason for hiding this comment

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

In addition, better to change this to const std::vector<const char* const> since no memory copies would then be needed to create std::string.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If I use direct list initialization instead of copy list initialization, is it still necessary to use char arrays?

Copy link
Contributor

Choose a reason for hiding this comment

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

Heck, it might be possible to completely do away with any allocations by using constexpr std::array<const char* const, ...>

Copy link
Contributor

Choose a reason for hiding this comment

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

To follow the standard, the system has to malloc both the std::vector and all the std::strings each call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But moving them outside of the function should avoid that, right? Does direct list initialization still entail memory copies?

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

@Dr15Jones
Copy link
Contributor

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented May 10, 2018

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/27900/console Started: 2018/05/10 23:04

@cmsbuild
Copy link
Contributor

Pull request #23186 was updated. @cmsbuild, @smuzaffar, @Dr15Jones can you please check and sign again.

@cmsbuild
Copy link
Contributor

@cmsbuild
Copy link
Contributor

Comparison job queued.

@Dr15Jones
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-23186/27900/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 6 differences found in the comparisons
  • DQMHistoTests: Total files compared: 30
  • DQMHistoTests: Total histograms compared: 2713999
  • DQMHistoTests: Total failures: 2254
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2711562
  • DQMHistoTests: Total skipped: 183
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 29 files compared)
  • Checked 124 log files, 14 edm output root files, 30 DQM output files

@fabiocos
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 82b04c2 into cms-sw:master May 11, 2018
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.

None yet

4 participants