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
Rearrange #ifdef STAT_TSB so file var statCount does not appear #2412
Conversation
A new Pull Request was created by @gartung (Patrick Gartung) for CMSSW_7_1_X. Rearrange #ifdef STAT_TSB so file var statCount does not appear It involves the following packages: RecoTracker/CkfPattern @nclopezo, @cmsbuild, @anton-a, @thspeer, @slava77, @Degano can you please review it and eventually sign? Thanks. |
+1 |
Is the ifdef-ed code actually used? |
possibly for some testing/debugging - I could not find STAT_TSB defined in standard code |
Can we actually find out with the tracking people and remove if not used (or add proper support for this kind of profiling so that it makes sense in multithreading?) |
OK. I will contact them and will follow up. |
Ok, looks like this is Vincenzo's code. now that I look at it, what is the problem with the original code? |
On 2/13/2014 4:56 AM, Giulio Eulisse wrote:
|
But it does nothing right? |
On 2/13/2014 7:19 AM, Giulio Eulisse wrote:
|
Discussing with Vincenzo, he actually uses it for developing tracking |
@Dr15Jones can you comment please. |
Having it in confuses the static analyzer. If Patrick has already done the work in #defining it out why not allow it? |
Because scattering the code of ifdefs for what is a static analyser On 13 Feb 2014, at 16:02, Chris Jones wrote:
|
On 2/13/2014 9:21 AM, Giulio Eulisse wrote:
|
So your concern is esthetics of the code???? |
My concern is polluting code with something unnecessary. If we can do it with a one line solution rather than a multitude of ifdefs, why not? |
@nclopezo please just check it compiles fine. |
@@ -78,7 +78,7 @@ | |||
}; | |||
#endif | |||
|
|||
StatCount statCount; | |||
[[cms::thread_safe]] StatCount statCount; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is misleading. If we are going to do this then it should be
#ifdef STAT_TSB
StatCount statCount;
#else
[[cms::thread_safe]] StatCount statCount;
#endif
That will properly describe the case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed.
Fine with me. Can you please squash the commits? |
Squashed. |
Thanks. Bypassing this. Complain if not ok. |
Misc fixes -- Flag as ok clang static analyser false positive for statCount.
upgrade evtgen to 1.6.0
This is obviously used for local debugging and file vars are not thread safe.