- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
I am doing some hotspot analysis on Image quality assesment algorithms. I found that my one of the default consructor is a hotspot.
I am doing some hotspot analysis on Image quality assesment algorithms. I found that my one of the default consructor is a hotspot.
// default constructor
template
inline GBuffer
size_type width,
size_type height
) : pData_(NULL), width_(width), height_(height),
tagX_(0), tagY_(0), sleeping_(false)
{
UpdateMemory(true);
}
when i click on the buttom up analysis and go to the source code. I am pointed to the
{
UpdateMemory(true);
}
I cannot understand what is wrong and why my constructor is a hotspot.
regards,
Siddharth
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I suspect that your code created many objects by using this construct (class GBuffer?).So UpdateMemory() will be called frequently...it'swhyUpdateMemory() consumed high CPU time.
You canreview call stack to know where it happened.
Regards, Peter
You canreview call stack to know where it happened.
Regards, Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The call stack pane shows the it was called 20 times. I am not sure if 20 times is a big number.
Regards,
Siddharth
Regards,
Siddharth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting sid9559
The call stack pane shows the it was called 20 times. I am not sure if 20 times is a big number.
Regards,
Siddharth
Regards,
Siddharth
That is statistical call, not real call count.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did not get you. what does a statistical call mean??
regards,
Siddharth
regards,
Siddharth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Statistical call graph means, the tool doesn'trecord all executions in function entry - uses sampling data collection to capture samples in function, and know callerfrom stack walk info. In this way, thetool finds all hot functions (source lines) with caller's info, but call count is not the REALfunction'sexecutionnumber.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
OK i get your point. Just to be sure, the tool takes samples at a predefined interval by interupting the execution and uses the instruction pointer to find out the function and the function which shows the maximum samples is a hotspot.
But still i do not understand how is the information from the call stack going to help me tune the program and remove my default constructor as a hotspot.
Also,from the call stack panei can see that my constructorhas been called say 'x' times. Could you please explain me the significance of this number.
Regards,
Siddharth
But still i do not understand how is the information from the call stack going to help me tune the program and remove my default constructor as a hotspot.
Also,from the call stack panei can see that my constructorhas been called say 'x' times. Could you please explain me the significance of this number.
Regards,
Siddharth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may consider if UpdateMemory() in constructor is necessary - review your algorithm, is it possile to remove UpdateMemory to member function, and call it when necessary...
If you keep UpdateMemory() in constructor, you may tune UpdateMemory() to reduce cycles, for example - predefined analysis "general exploration" to find issues in microarchitecture, i.e. cache misses, branch misprediction, etc.
Regards, Peter
If you keep UpdateMemory() in constructor, you may tune UpdateMemory() to reduce cycles, for example - predefined analysis "general exploration" to find issues in microarchitecture, i.e. cache misses, branch misprediction, etc.
Regards, Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Alright, it makes sense. I will try that out and see what happens. Also, as i asked you previously, what is the significance of the number of calls shown in the call stack pane and how is that usefull. could you explain me breifly??
regards,
Siddharth
regards,
Siddharth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to care of the caller with high percent - which is a critical path in call stack to hot function.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page