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

CMSSW Config Tracing Tool #25762

Merged
merged 23 commits into from Feb 11, 2019
Merged

Conversation

schneiml
Copy link
Contributor

This PR adds two tools that help with understanding CMSSW configurations.

  • cmsswFiletrace.py uses the Python settrace feature to track call graphs and therefore imports etc.
  • cmsswConfigtrace.py uses hooks to attach additional information to the config objects, like the EnablePSetHistory thing used to do.

cmsswConfigtrace is more advanced and comes with a small web frontend to read the saved information.

I put the tools into DQMOffline/Configuration since I intend to use them for DQM offline configuration, though they are rather generic.

Using the python trace module, which is rather slow.
Also ignoring stdlib/FWCore seems to not work atm.
There is not much performance to be gained by not doing the call tracing.
The calltree output now be processed with the FlameGraph tool.
This is related to the PSetHistory mode in CMSSW, but tracks something slightly different: The goal is to keep track of all places in the configuration that actually affect the process running in the end.

A the moment there is no output, but the _trace_events on each Sequence are populated with the lines of code that modified this Sequence. Since all the constituents are preserved in the _seq itself, this should be enough to reconstruct the entire configuration tree and assign a source location to each item.
The output is for each object remaining in the process the place where this object is used (can be multiple). This is not very intuitive, but should be visualizable as an annotation on the source code, as 'why is this object needed?'
Still not able to see through 'convertToUnscheduled', we' have to knock that one out.
Also there is still sometimes issues with database locking.
@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25762/8176

  • This PR adds an extra 68KB to repository

  • Found files with invalid states:

    • DQMOffline/Configuration/scripts/cmsswCalltree.py:

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

The code-checks are being triggered in jenkins.

(though not tested on python3)
@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

The code-checks are being triggered in jenkins.

@schneiml
Copy link
Contributor Author

schneiml commented Feb 8, 2019

@fabiocos I changed the python lines.
BTW, a experimental setup of the UI can be seen here: http://cmsswconfigexplore.cern.ch:1234/ (only inside CERN)

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-25762/8363

  • This PR adds an extra 72KB to repository

  • Found files with invalid states:

    • DQMOffline/Configuration/scripts/cmsswCalltree.py:

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

Pull request #25762 was updated. @cmsbuild, @kmaeshima, @andrius-k, @jfernan2, @schneiml can you please check and sign again.

@andrius-k
Copy link

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-any-integration/33055/console Started: 2019/02/08 14:45

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

Comparison job queued.

@cmsbuild
Copy link
Contributor

cmsbuild commented Feb 8, 2019

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

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 32
  • DQMHistoTests: Total histograms compared: 3097440
  • DQMHistoTests: Total failures: 1
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 3097242
  • DQMHistoTests: Total skipped: 197
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 31 files compared)
  • Checked 133 log files, 14 edm output root files, 32 DQM output files

@andrius-k
Copy link

+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)

@kpedro88
Copy link
Contributor

+1

@cmsbuild cmsbuild merged commit 395caa5 into cms-sw:master Feb 11, 2019
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

5 participants