-
Notifications
You must be signed in to change notification settings - Fork 396
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
Region created but destructor not called? #6787
Comments
The node region is used to allocate nodes, which may live until the end of the compilation, so that one is no problem. Each CFG has an "internal" and a "structure" memory region. The main CFG lives until the end of the compilation, so that one is fine as well. Inlining creates temporary CFGs for methods under consideration during I've written some changes related to CFG here - that I just haven't yet had a chance to contribute - which have the following effects:
In compilations with a lot of inlining, these changes will dramatically reduce the number of CFG-related regions, which makes my (also yet-to-be-contributed) region tracing/visualization much more efficient and less misleading. (The large number of CFG-related regions seemed to be much more worrisome than it really was.) The one that really surprises me here is the stack region in |
Thanks for detailed explanations for each of the cases! For that one in
The backtrace of this region's constructor:
The tracked source of this region is from call of I've also checked if this is an issue happens by accident like the compilation is terminated before it completes, but it appeared in all of the four hot compilations I collected data from and they use segment provider to allocate a total of 589824, 262144, 131072, and 131072 bytes in this region. Generally hundreds of KB is caused by this region. Compared to total usage of usually tens or hundred of MB for one compilation, this region's contribution is small. My current track depth for region's constructor is only three levels back in the stack, I feel I need to extend tracked depth to find the real source in this case. Will get back to this case after I increase the backtrace depth. Thank you! |
Regardless of the calling context, it shouldn't be possible to exit |
Dear developers,
I’m currently looking at memory usage by OpenJ9 JVM during JIT compilation. I track the usage of memory allocated by segment providers by regions and allocations.
I found some regions in OMR that are created but their destructors never be called. These regions call allocate() and hold memory from segment provider until the end of a compilation. I feel this might imply possible memory leak.
Here is the list of such regions by where they are created:
https://github.com/eclipse/omr/blob/556374a6151cdaac3570316a3bc00c3fd7d9c56f/compiler/infra/OMRCfg.hpp#L101
https://github.com/eclipse/omr/blob/556374a6151cdaac3570316a3bc00c3fd7d9c56f/compiler/infra/OMRCfg.hpp#L108
https://github.com/eclipse/omr/blob/556374a6151cdaac3570316a3bc00c3fd7d9c56f/compiler/optimizer/OMROptimizationManager.cpp#L270
https://github.com/eclipse/omr/blob/556374a6151cdaac3570316a3bc00c3fd7d9c56f/compiler/compile/OMRCompilation.cpp#L321
The text was updated successfully, but these errors were encountered: