This is the mail archive of the sid@sources.redhat.com mailing list for the SID project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

gprof store and reset pins


Hi,

I've been trying to use gdb and gprof components in 'sid' to get the profiling
information out. The problem is that by default (i.e. options --gdb=PORT and
--gprof=FILE) will dump the information to gmon.out only once gdb disconnects
from the target. That happens because of the following default configuration:

connect-pin shutdown-seq output-7 -> mm_A-0/gprof store

What I would like to do is get gmon.out dumped while still being connected.
Also I would like to have some way of reseting the gprof info (driving the
'reset' pin) on demand (presumably using the 'gdb' component or the
'io-socket' component - but not necessarily using the 'gdb' debugger). That
would have the benefit of being able to collect the profiling data only for one
section of the code - not for the entire program.

For the first problem, I changed the configuration file to say

connect-pin yield-net output-0 -> mm_A-0/gprof store

(yield-net input is driven by 'gdb' yield). So that has the effect of dumping
gmon.out whenever the target process stops. It is not demand driven, and it
probably dumps it more often than I want, but it is good enough for now.

However, I can't figure out which output pin to use to drive 'gprof reset'
command. One option was to do

connect-pin shutdown-seq output-7 -> mm_A-0/gprof reset

but then I get a reset only after I disconnect from 'sid'. What I really need
is some way of reseting it while still being connected.

I would appreciate any help with this.

Thanks

Nikola Valerjev
Green Hills Software




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]