Hi,
I’m trying to use the application profiler in Momentics 6.3.0 - PE IDE
on windows using qconn on a remote x86 target machine, and would like
some verification if I’m going about it the right way.
When I tried profiling my multi-threaded application, the profiler
view shows the same function three times as having the highest number
of calls, called from three different functions. When in fact that
function isn’t actually being called at all! ( eg. if I place a
breakpoint in the function it never halts) and when I look at call
information the call graph is confusing showing a large call stack
with sequential functions that don’t call each other, as well as
functions that aren’t getting called etc.
The other strange feature of the profiler is the thread processor
usage view won’t display while the application is being profiled.
When I click on the thread processor usage tab, the view is displayed
for a brief moment then the console view is displayed on top.
I questioned whether the profiler wasn’t handling multiple threads so
I created a single threaded C++ application which is attached below,
to test out the profiler. The result of the profiler on this input
suprised me, as the call information shows three function calls, all
labeled main, while there is no mention of the class members being
called! I was expecting to see evidenc of A::OrderN being called etc.
I’ve tried disabling optimisation, disabling stripping debug info from
the downloaded application etc. all with no avail.
I was hoping that somebody who has had some success with the IDE
profiler using a remote target, could give me some help in it’s
proper usage.
Regards, Ross
------ main.cpp --------
#include
#include
//trivial class with a public and private interface
class A
{
public:
void OrderN(int limit)
{
for( int i = 0 ; i < limit ; ++i)
{
DoPrivateStuff(i);
}
}
private:
void DoPrivateStuff(int i)
{
m_num = i*i;
}
float m_num;
};
//trivial class with a public and private interface
class B
{
public:
void OrderNSquared(int limit)
{
for( int i = 0 ; i < limit ; ++i)
{
for( int j = 0 ; j < limit ; ++j)
{
DoPrivateStuff(i*j);
}
}
}
private:
void DoPrivateStuff(int i)
{
m_num = i*i;
}
float m_num;
};
int main(int argc, char *argv[]) {
//try creating objects and invoking calls to their member
functions
A a;
B b;
a.OrderN(100);
b.OrderNSquared(100);
return EXIT_SUCCESS;
}