IDE Profiling

bridged with qnx.development_tools
Chris Herborth

Re: IDE Profiling

Post by Chris Herborth » Wed Nov 24, 2004 4:39 pm

Robert Muil wrote:
Is it a QNX C project, or a Standard Make project?

A QNX C project.
Ah... don't attempt to edit CFLAGS/CCFLAGS/LDFLAGS/etc. in the Makefile
or common.mk files. You want to edit the project properties
(right-click the project, choose Properties). Click QNX C/C++ Project
in the left-hand list, then on the Options pane check the "Build with
Profiling" option. Apply, then rebuild your application.

If you need or want to, you can also specify other compiler options,
defines, etc. on the Compiler and Linker panes.
If a QNX C project, you probably need to do it through the GUI, you're
not supposed to edit the Makefile. (In fact, I don't know what editing
the Makefile does.)

There is no way to modify the command line in the 6.2.1 IDE.
Instructions above are for the 6.3.0 IDE, sorry.

In your common.mk you could add:

CCOPTS+=-p
LDOPTS+=-p

Yeah, I know I said not to edit common.mk above, but if you don't have
another way to change this, common.mk is actually safe (you specify your
'use' message file in there, too).
For 6.2.1, I don't remember for sure, but for a Standard Make project,
it should probably be set to QNX Binary parser. I don't think it will
make a difference, but I'm not sure.

There is no 'QNX binary parser'. It is either 'Elf Parser' or 'PE Windows
Parser'. The distinction eludes me.
Use the ELF parser. Binaries in QNX are in ELF format; the PE parser is
there to support Windows development from Eclipse (ie, it's part of the
generic CDT, not an add-on from Momentics)... PE is the binary format
for Windows.

--
Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

David Gibbs

Re: IDE Profiling

Post by David Gibbs » Wed Nov 24, 2004 6:49 pm

Robert Muil <r.muil@crcmining.com.au> wrote:
Does the binary parser option in project settings have anything to do
with
this?
For a QNX project, it should be set properly automatically.

It is not set by default: the 2 radio buttons are both blank.
Sorry, what I meant is that for a QNX C project, the tools know
to use the QNX analysis tool chain.

For a standard make project, it isn't a QNX project, so you have
to tell the IDE how to tear apart executables, etc -- so setting
the binary parser is needed there. In some cases, for 6.2.1
a tool may not have worked, or worked properly, for a Standard
Make project, because the IDE does not how to figure out the
toolset, I think with 6.3.0 this was "fixed" by giving a
QNX Binary parser choice for Standard Make project. (That is,
I think that choice was added in the 6.2.1B -> 6.3.0 changes.)
For 6.2.1, I don't remember for sure, but for a Standard Make project,
it should probably be set to QNX Binary parser. I don't think it will
make a difference, but I'm not sure.

There is no 'QNX binary parser'. It is either 'Elf Parser' or 'PE Windows
Parser'. The distinction eludes me.
For a QNX C project, you shouldn't need to touch this setting.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

David Gibbs

Re: IDE Profiling

Post by David Gibbs » Wed Nov 24, 2004 7:17 pm

Robert Muil <r.muil@crcmining.com.au> wrote:
Wasn't intended to be a compilable example -- I'll include at the end
the actual sample code I used, and the gprof output.

:)

I didn't try to compile what you posted. I added relevant code. Run as root,
I get similar results to you. I see that your point is valid - and very
surprising. gprof is blatantly fabricating information.
Yup.
Word up to Microsoft for their profiler.
Ah, their profiler does handle the CPU useage attribution better?
I think it is added to the core with Eclipse 3.0. It will definitely
be post 6.3.0.

So support and development for 6.2.1 is over?
Still supported, but new feature development will be in current
release head.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

Robert Muil

Re: IDE Profiling

Post by Robert Muil » Thu Nov 25, 2004 2:07 am

Ah... don't attempt to edit CFLAGS/CCFLAGS/LDFLAGS/etc. in the Makefile or
common.mk files. You want to edit the project properties (right-click the
project, choose Properties). Click QNX C/C++ Project in the left-hand
list, then on the Options pane check the "Build with Profiling" option.
Apply, then rebuild your application.

If you need or want to, you can also specify other compiler options,
defines, etc. on the Compiler and Linker panes.

If a QNX C project, you probably need to do it through the GUI, you're
not supposed to edit the Makefile. (In fact, I don't know what editing
the Makefile does.)

There is no way to modify the command line in the 6.2.1 IDE.

Instructions above are for the 6.3.0 IDE, sorry.
I really wish I could use the new IDE. Is it possible to make it backward
compatible with 6.2.1 targets? Like specifying different qconn etc?
In your common.mk you could add:

CCOPTS+=-p
LDOPTS+=-p
I am not trying to add profiling - the IDE options do that fine. I am trying
to change the debug format to dwarf2 with the -gdwarf-2 compile flag.

I have added CCOPTS+=-gdwarf-2 to every conceivable place in common.mk and
it does not affect the compile options. CFLAGS is also ignored.

If I put CCFLAGS+=-gdwarf-2 and LDFLAGS+=-gdwarf-2 in the common.mk, it will
add the options as expected to the command line i see in the C-Build view.

However, this does NOT solve the off-by-one line problem.
Use the ELF parser. Binaries in QNX are in ELF format; the PE parser is
there to support Windows development from Eclipse (ie, it's part of the
generic CDT, not an add-on from Momentics)... PE is the binary format for
Windows.
Aha. Thanks - that makes sense. Perhaps a mention in the docs would be worth
someone's time?

Miguel Simon

Re: IDE Profiling

Post by Miguel Simon » Sun Nov 28, 2004 5:33 pm

Hi Cris...

I wonder, when you say 'SP1', are you referring to a QNX release? If
so, is this available any where? When I go to the 'myQNX' place, I see
no updates any where. Thanks.

Regards...

Miguel.

Chris Herborth wrote:
Robert Muil wrote:

I appreciate that people like yourself do, and QNX's development is
admirable. But please, less marketing hype. Aim the documentation at
technicians and engineers, not other marketing departments.


The IDE User's Guide has had quite a number of changes for SP1, but
we're always interested in specific feedback about the docs...

Evan Hillas

Re: IDE Profiling

Post by Evan Hillas » Sun Nov 28, 2004 10:31 pm

Miguel Simon wrote:
Hi Cris...

I wonder, when you say 'SP1', are you referring to a QNX release? If
so, is this available any where? When I go to the 'myQNX' place, I see
no updates any where. Thanks.
"Patch A" would be the correct term, unless QSS have changed their
naming scheme. And, no it's not released yet.

David Gibbs

Re: IDE Profiling

Post by David Gibbs » Mon Nov 29, 2004 3:54 pm

Miguel Simon <simon@ou.edu> wrote:
Hi Cris...

I wonder, when you say 'SP1', are you referring to a QNX release? If
so, is this available any where? When I go to the 'myQNX' place, I see
no updates any where. Thanks.
Service Pack 1 (SP1) for 6.3.0 is in pre-release testing right now.

-David
--
David Gibbs
QNX Training Services
dagibbs@qnx.com

Chris Herborth

Re: IDE Profiling

Post by Chris Herborth » Mon Nov 29, 2004 6:44 pm

Robert Muil wrote:
I really wish I could use the new IDE. Is it possible to make it backward
compatible with 6.2.1 targets? Like specifying different qconn etc?
If you install 6.3.0 on a system with 6.2.1 already installed, you have
the option of using 6.2.1 or 6.3.0 tools. As for things that aren't
under the aegis of the IDE (like qconn), if you didn't upgrade your
target machine, it'd still be running the 6.2.1 versions.
In your common.mk you could add:

CCOPTS+=-p
LDOPTS+=-p

I am not trying to add profiling - the IDE options do that fine. I am trying
to change the debug format to dwarf2 with the -gdwarf-2 compile flag.
Ah, sorry!
I have added CCOPTS+=-gdwarf-2 to every conceivable place in common.mk and
it does not affect the compile options. CFLAGS is also ignored.

If I put CCFLAGS+=-gdwarf-2 and LDFLAGS+=-gdwarf-2 in the common.mk, it will
add the options as expected to the command line i see in the C-Build view.
I think the QNX Makefile hierarchy is going to use qcc, so you probably
want to add:

CCOPTS+=-Wc,-gdwarf-2
LDOPTS+=-Wl,-gdwarf-2

(although I'm not entirely sure it's required for LDOPTS... better safe
than sorry).
However, this does NOT solve the off-by-one line problem.
No, but I think 6.3.0SP1 improves this.
Use the ELF parser. Binaries in QNX are in ELF format; the PE parser is
there to support Windows development from Eclipse (ie, it's part of the
generic CDT, not an add-on from Momentics)... PE is the binary format for
Windows.

Aha. Thanks - that makes sense. Perhaps a mention in the docs would be worth
someone's time?
Good idea, I'll add it to The List(TM) for the IDE User's Guide.

--
Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

Chris Herborth

Re: IDE Profiling

Post by Chris Herborth » Mon Nov 29, 2004 6:44 pm

Miguel Simon wrote:
I wonder, when you say 'SP1', are you referring to a QNX release? If
so, is this available any where? When I go to the 'myQNX' place, I see
no updates any where. Thanks.
6.3.0 Service Pack 1 is currently in the "coming soon!" state.

--
Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

Miguel Simon

Re: IDE Profiling

Post by Miguel Simon » Mon Nov 29, 2004 6:59 pm

Hi Chris...

Thanks. That is what I thought. I think that this release or patch has
been coming for a long time now. What is the name of the release, 'SP1'
or 'patch A'? Just as others have mentioned, is QSSL changing to the
'SP' versus 'patch' naming convention? Thanks.

Also, do you know (or can you tell) what are some of the things that are
included in this next release? For example, the Java VM, would it be a
new version close to at least Java 1.4.2_0x? How about the IDE for the
PE edition, would it be closer to Eclipse 3.0? Thanks.


Regards....

Miguel.



Chris Herborth wrote:
Miguel Simon wrote:

I wonder, when you say 'SP1', are you referring to a QNX release? If
so, is this available any where? When I go to the 'myQNX' place, I
see no updates any where. Thanks.


6.3.0 Service Pack 1 is currently in the "coming soon!" state.

Chris Herborth

Re: IDE Profiling

Post by Chris Herborth » Mon Nov 29, 2004 8:30 pm

Miguel Simon wrote:
Thanks. That is what I thought. I think that this release or patch has
been coming for a long time now. What is the name of the release, 'SP1'
or 'patch A'? Just as others have mentioned, is QSSL changing to the
'SP' versus 'patch' naming convention? Thanks.
I think the change is to reflect scope... a "Service Pack" applies to
several areas of the product (OS, tools, etc.) and a "Patch" applies to
just one thing (such as a tools update).
Also, do you know (or can you tell) what are some of the things that are
included in this next release? For example, the Java VM, would it be a
new version close to at least Java 1.4.2_0x? How about the IDE for the
PE edition, would it be closer to Eclipse 3.0? Thanks.
I can't say anything about what's included or not until an announcement
is made.

--
Chris Herborth (cherborth@qnx.com)
Never send a monster to do the work of an evil scientist.

Miguel Simon

Re: IDE Profiling

Post by Miguel Simon » Mon Nov 29, 2004 11:52 pm

Hi Chris...

Thanks.

Regards...

Miguel.



Chris Herborth wrote:
Miguel Simon wrote:

Thanks. That is what I thought. I think that this release or patch has
been coming for a long time now. What is the name of the release,
'SP1' or 'patch A'? Just as others have mentioned, is QSSL changing
to the 'SP' versus 'patch' naming convention? Thanks.


I think the change is to reflect scope... a "Service Pack" applies to
several areas of the product (OS, tools, etc.) and a "Patch" applies to
just one thing (such as a tools update).

Also, do you know (or can you tell) what are some of the things that
are included in this next release? For example, the Java VM, would it
be a new version close to at least Java 1.4.2_0x? How about the IDE
for the PE edition, would it be closer to Eclipse 3.0? Thanks.


I can't say anything about what's included or not until an announcement
is made.

Robert Muil

Re: IDE Profiling

Post by Robert Muil » Tue Nov 30, 2004 2:32 am

I really wish I could use the new IDE. Is it possible to make it
backward compatible with 6.2.1 targets? Like specifying different
qconn etc?
If you install 6.3.0 on a system with 6.2.1 already installed, you
have the option of using 6.2.1 or 6.3.0 tools. As for things that
aren't under the aegis of the IDE (like qconn), if you didn't upgrade
your target machine, it'd still be running the 6.2.1 versions.
I know that. My situation is this. Targets run 6.2.1b. Cannot be upgraded.
IDE 6.2.1 is completely unuseable. IDE 6.3.0 does not cooperate with 6.2.1
targets.

So, I am using vim/make/gdb, and I have no way of profiling.
I think the QNX Makefile hierarchy is going to use qcc, so you
probably want to add:
CCOPTS+=-Wc,-gdwarf-2
LDOPTS+=-Wl,-gdwarf-2
Tried that, but they are not seen by the compiler at all, so I tried
CCFLAGS+=-Wc,-gdwarf-2
(the linker did not accept the argument so I left LDFLAGS out).

This option was accepted by the compiler, but it had no affect. Line number
reference from the profiler/debugger are still mucked up.

Perhaps Steve Reid has some more information on this?
However, this does NOT solve the off-by-one line problem.
No, but I think 6.3.0SP1 improves this.
Improves? Is it now off by 1/2 a line? :)
Use the ELF parser. Binaries in QNX are in ELF format; the PE
parser is there to support Windows development from Eclipse (ie,
it's part of the generic CDT, not an add-on from Momentics)... PE
is the binary format for Windows.
Aha. Thanks - that makes sense. Perhaps a mention in the docs would
be worth someone's time?
Good idea, I'll add it to The List(TM) for the IDE User's Guide.
Cool, thanks.

Alex/Systems 104

Re: IDE Profiling

Post by Alex/Systems 104 » Tue Nov 30, 2004 6:37 am

On Mon, 29 Nov 2004 15:30:19 -0500, Chris Herborth <cherborth@qnx.com>
wrote:
Miguel Simon wrote:
Thanks. That is what I thought. I think that this release or patch has
been coming for a long time now. What is the name of the release,
'SP1' or 'patch A'? Just as others have mentioned, is QSSL changing to
the 'SP' versus 'patch' naming convention? Thanks.

I think the change is to reflect scope... a "Service Pack" applies to
several areas of the product (OS, tools, etc.) and a "Patch" applies to
just one thing (such as a tools update).
Will it go through a beta cycle?
If not, I think it may be a good idea to do so...
IT sounds like this SP will touch a wide range of functionality.

Steve Reid

Re: IDE Profiling

Post by Steve Reid » Tue Nov 30, 2004 1:47 pm

Robert Muil <r.muil@crcmining.com.au> wrote:
Perhaps Steve Reid has some more information on this?
Not me. Chris is the writer who's working on the IDE User's Guide, so he
knows a lot more about the IDE than I. I'll learn more the next time I
get to edit it. :-)

------------------------------------------
Steve Reid stever@qnx.com
TechPubs (Technical Publications)
QNX Software Systems
------------------------------------------

Post Reply

Return to “qnx.development_tools”