From: Flemming Madsen (fma_at_ccieurope.com)
Date: Wed Jan 09 2002 - 10:09:56 GMT
I have always wondered why Ups would take up all CPU on linux while the target is running. In my experience that _is_ happening. Why not usleep() for maybe 10ms for each iteration. That would most probably take the CPU load down to a sub-percent level. -- wkr /Flemming Tom Hughes wrote: > > In message <XFMail.20020109092422.James_at_Armstrong.uk.net> > James_at_Armstrong.uk.net wrote: > > > I have just built the latest beta of UPS (3.37 beta4) for an x86 > > machine running RedHat 7.1 and the first thing that struck me was > > that UPS uses 20-25% of the cpu whilst the process being debugged is > > running.. This compares to < 1% usage by ups version 3.36 (admittedly > > the 3.36 version is running under redhat 6.2). Is the new ups doing > > more? and if so can I disable this? > > I can reproduce this, and I understand why it is happening, but I don't > see anything different with 3.36 in my environment - the code in question > is the same and the result (high cpu utilisation) is also the same. > > The reason is that ptrace_wait_for_target() in ao_ptrace.c is trying > to watch both for a change of state in the target process and for the > user pressing the stop button and it is doing so by busy waiting, > testing for each change in turn. > > Fixing it would mean that one of the notifications would have to be > made to happen asynchronously so that a blocking wait could then be > done on the other notification. > > Tom > > -- > Tom Hughes (thh_at_cyberscience.com) > Software Engineer, Cyberscience Corporation > http://www.cyberscience.com/
This archive was generated by hypermail 2.1.4 : Wed Feb 13 2002 - 21:51:34 GMT