merijnb 4 Posted July 8 Inspired by @Stefan Glienke's talk on the Delphi Summit in Amsterdam I've tried using the v-tune profiler. We had a performance issue and solved it, and I tried using that case to 'reverse test' using v-tune. In other words, I already know what the issue was, how could I have found this using v-tune? The issue I'm running into is that there is too much noise to see what I'm looking for, I understand that (for example) EurekaGetMem (from Eurekalog) is called many times, but that's -at this point- not interesting to me. I'd like to filter on certain source files, like tell me what took the most times if you only look at the code I've written, nothing from Delphi, Eurekalog, FastMM, etc. Is this possible? Share this post Link to post
Anders Melander 1815 Posted July 8 Assuming you're using map2pdb to generate the PDB-file for VTune, you can specify on the map2pdb command line which units to include and which to exclude. For example, I often use these filters (excludes DevExpress, the VCL, Indy, etc.): -include:0001 -exclude:dx*;cx*;winapi.*;vcl.*;data.*;firedac.*;soap.*;web.*;datasnap.*;id*;vcltee.* However, that will not prevent VTune from profiling that code. It just can't resolve the addresses in those units. As far as I know, the only way to filter data in VTune is to either use the filter fields at the bottom of the Window or to select the lines you'd like to exclude/include, right click and then select Filter In by Selection/Filter Out by Selection from the context menu. https://www.intel.com/content/www/us/en/docs/vtune-profiler/user-guide/2024-2/context-menu-grid.html Share this post Link to post
Stefan Glienke 2019 Posted July 8 Changing anything with the map file will only remove the names, the functions being called will still be in the sampling result because VTune is a sampling profiler. Given that obviously, your performance problem was not with these functions they should not be a significant part of the result percentage-wise - if they are, they are part of the issue. Share this post Link to post
merijnb 4 Posted July 9 Well even if they are part of the problem, it might be to deep in the call stack to make sense. If most of the time goes to allocating memory, I'd like to know which parts of my code is allocating memory. I can look at all the calls tot GetMem and check their callstacks, but I'd rather just filter out system.pas overall. V-Tune does know which unit the call came from, so I'm surprised that it doesn't seem possible to filter in that way? Share this post Link to post
Anders Melander 1815 Posted July 9 Well, if you are looking at the bottom-up view then you will get the result ordered by the call tree leaf nodes. As I understand it, you want to trim the tree to remove the low level entries. I think the closest thing to what you're after is to simply use the top-down view instead and drill down to the desired detail level. 1 Share this post Link to post