MATLAB Answers

Can the matlab profiler be used in code employing classes with overleaded methods?

4 views (last 30 days)
Dear Mathworks,
I am tryining to use profiler in a code where I have a script - the most computationally heavy line of which is call to class method: "algo_objects{a_i}.update()" which happens to be overloaded. I can see that when I view the profiler results for the main script by looking at the line numbers However, the method "update" does not appear anywhere in the outputs of the profiler. I am using openSUSE operating system. So the question is : can the profiler be used in this situation? How can I locate the functions (which are class methods) in the ouput? A lot of function names are listed as "_____________" and I don't know which function they actually refer to.
BR/ Per BR/ Per

  0 Comments

Sign in to comment.

Accepted Answer

Philip Borghesani
Philip Borghesani on 12 Jan 2018
The profiler should work just fine in this situation. However without a bit more information or an example All we can do is guess. Can you post a screen grab or even better upload results from profsave or simplify the code and post example code that can be used to reproduce what your are seeing?
My first guess is that the viewer is dealing with a long function names poorly and that what you are looking for is there. Try sorting by self or total time and look at expensive functions or look at the function that calls update and examine/link-to its children to view the function you are looking for.
You can also examine the data in info=profile('info') to find data for the function you are looking for. When you find the function you can use: profview( name or index, info) to view the results for that function
If things still don't seem correct i suggest contacting support to see if there is a bug or enhancement needed to help you out.

  0 Comments

Sign in to comment.

More Answers (0)

Products