- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Does debug flag impact a c++ application perfo...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 03:59 AM
тАО03-26-2010 03:59 AM
I compiled my c++ application with -g0 +d flags.
The compiler I use is aCC.
After compiling with this flags the performance decreased.
As I also others changes in the application, I would like descarting that debug flags is the problem.
Does debug flag impact a c++ application performance?
Thanks in advanace
Solved! Go to Solution.
- Tags:
- debug
- performance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-26-2010 05:55 AM
тАО03-26-2010 05:55 AM
Re: Does debug flag impact a c++ application performance?
> performance?
It might reduce it. If adding the debug
flags _improved_ performance, then wouldn't
everyone use them always?
If nothing else, I'd expect the executable
to be bigger, so that loading it would use
more virtual memory (which seems unlikely to
help performance). Then, generally, when
compiling for debug, most people use less (or
no) compiler optimization, so that a debugger
can better correlate instructions in the
executable with lines in the source code.
> [...] I would like [...]
Why not run the experiment, and see what
happens?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2010 01:40 AM
тАО03-27-2010 01:40 AM
Re: Does debug flag impact a c++ application performance?
No, not with -g*, only with the long dead cfront.
>I compiled my C++ application with -g0 +d flags.
But turning off inlining with +d will have a negative impact.
>Steven: I'd expect the executable to be bigger, so that loading it would use more virtual memory
No, debug info is not loadable.
>generally, when compiling for debug, most people use less optimization, so that a debugger can better correlate instructions in the executable with lines in the source code.
Yes. Otherwise if you use +Ox, -g has no effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-27-2010 01:43 PM
тАО03-27-2010 01:43 PM
Re: Does debug flag impact a c++ application performance?
So I compiled the application with -g0 +d to have those informations.
But in production the performance decreased.
So, what's the better option I have to compile with debug flag without impact the application performance?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2010 02:21 AM
тАО03-28-2010 02:21 AM
SolutionCan you provide a stack trace?
>So I compiled the application with -g0 +d to have those info.
You should try to debug without +d.
>what's the better option I have to compile with debug flag without impact the application performance?
Why do you care about performance if you are debugging? You add -g0, debug, then remove it. Or do you need to debug at remote sites, for your customers?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2010 11:04 AM
тАО03-28-2010 11:04 AM
Re: Does debug flag impact a c++ application performance?
I know what's happening in the coredump, but I need the information of some variables to fix it.
>You should try to debug without +d.
Ok, without +d I can have the same performance between -g0 and without -g0.
>Why do you care about performance if you are debugging?
Because the coredump just occurs in my customer enviroment. In addition, different coredumps frequently occurs, so I need that my application always runs with debug flag, to help me to analyse core files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-28-2010 12:52 PM
тАО03-28-2010 12:52 PM
Re: Does debug flag impact a c++ application performance?
It's in your code and it's obvious?
>without +d I can have the same performance between -g0 and without -g0.
Yes.
I assume you know about +noobjdebug?