Added ITT traces to GStreamingExecutor#19917
Conversation
ff8bb51 to
3757ce2
Compare
66a90b7 to
09a5fa9
Compare
dmatveev
left a comment
There was a problem hiding this comment.
I believe SyncQueue instrumentation can be dropped for now as it only bloats the trace and is nearly equal to StreamingInput::get and so on. Overall well done!
| backend_name = matches[1].str(); | ||
| island_name = island_name + "_" + backend_name; | ||
| } | ||
| } |
There was a problem hiding this comment.
If match fails, I'd use the full backend type name instead of nothing.
There was a problem hiding this comment.
Full backend name will contain some mangled symbhols and numbers which are maps to "::" namespace resolution operator, is it applicable?
There was a problem hiding this comment.
Yes, please use the full name in that case.
9ad402b to
a2b654a
Compare
7caf350 to
d8ece4a
Compare
|
Hi Anton(@anton-potapov)! |
dmatveev
left a comment
There was a problem hiding this comment.
I think TBB changes are ok and you can proceed with merge after fixing the non-regular island name handling.
| if (std::regex_search(backend_impl_type_name, matches, rgx)) { | ||
| if (2ul == matches.size()) { | ||
| backend_name = matches[1].str(); | ||
| island_name = island_name + "_" + backend_name; |
There was a problem hiding this comment.
This one is reworked!
| backend_name = matches[1].str(); | ||
| island_name = island_name + "_" + backend_name; | ||
| } | ||
| } |
There was a problem hiding this comment.
Yes, please use the full name in that case.
|
|
||
| // Create just empty island meta information | ||
| std::string island_meta_info { }; | ||
| #if defined(OPENCV_WITH_ITT) && !defined(GAPI_STANDALONE) |
There was a problem hiding this comment.
btw whats wrong with STANDALONE here?
There was a problem hiding this comment.
Fixed!
Thanks a lot!
I have realized that OPENCV_WITH_ITT will be defined only if ITT dependency will be successfully resolved, what can be done only if we building with OpenCV. So, there will be no such define in G-API standalone mode and check for !GAPI_STANDALONE is extra.
I have added a comment about this in itt.hpp file and TODO to support ITT traces in GAPI standalone mode in CMakeLists.txt.
| // FIXME: GAPI_EXPORTS because of tests only! | ||
| ade::NodeHandle GAPI_EXPORTS producerOf(const ConstGraph &g, ade::NodeHandle &data_nh); | ||
|
|
||
| // traceName - returns pretty island name for passed island node |
There was a problem hiding this comment.
I believe in should be traceIslandName
a6faabb to
96e2e5a
Compare
96e2e5a to
12170ab
Compare
|
Hi Maxim(@mshabunin), Alexander(@alalek)! |
12170ab to
6d630ab
Compare
| std::string backend_name = ""; | ||
| auto& backend_impl = island_ptr->backend().priv(); | ||
| std::string backend_impl_type_name = typeid(backend_impl).name(); | ||
| std::regex rgx("G([a-zA-Z0-9]+)BackendImpl"); |
There was a problem hiding this comment.
std::regex is not working in GCC<4.9 (https://stackoverflow.com/questions/12530406/is-gcc-4-8-or-earlier-buggy-about-regular-expressions), but we still kinda support CentOS 7 which uses GCC 4.8.5. Is it possible to rewrite this part without regex usage?
f82892a to
4568709
Compare
4568709 to
3a49ff9
Compare
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.