Hi Lewis,
Thanks for the reply.
I don't think that could be it, because I can reduce the CPU time of my application from 20% to 14% by changing a PV to eliminate calculations that are definitely done in my code. I collected the profile with those calculations enabled, so at least (20-14)/20 = 30% of the CPU time should be in my calculation function. It's spending the rest of its time reading short TCP messages which are coming in at 6.5 kHz, and I think that will result in a non-trivial amount of time in drvAsynIPPort. Some of it will be in the system Ethernet driver, network stack, etc.
Thanks,
Mark
-----Original Message-----
From: J. Lewis Muir [mailto:[email protected]]
Sent: Monday, September 10, 2012 4:49 PM
To: Mark Rivers
Cc: [email protected]
Subject: Re: How to profile an EPICS application on Linux
On 9/10/12 4:17 PM, Mark Rivers wrote:
> Does anyone with gprof experience know why I am not getting the execution times in these functions?
Hi, Mark.
I don't have gprof experience, but it could be that your
application is spending most of its time sleeping or blocking,
so, since gprof works by taking measurements while your
application is running in user-space, it sees time spent in your
application as very small compared to time spent in
kernel-space, and thus results in times rounded to 0 for all
those function calls.
The following article talks about this toward the end:
http://www.ibm.com/developerworks/library/l-gnuprof.html
It suggests that if you run your application with the "time"
command and the output says you're spending hardly any time in
user-space, then gprof might not be useful to you.
Lewis
- Replies:
- Re: How to profile an EPICS application on Linux J. Lewis Muir
- References:
- How to profile an EPICS application on Linux Mark Rivers
- Re: How to profile an EPICS application on Linux J. Lewis Muir
- Navigate by Date:
- Prev:
Re: Doubt regarding standards followed by EPICS Andrew Johnson
- Next:
Re: How to profile an EPICS application on Linux J. Lewis Muir
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: How to profile an EPICS application on Linux J. Lewis Muir
- Next:
Re: How to profile an EPICS application on Linux J. Lewis Muir
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
<2012>
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
|