pmuldoon -> cagney, how evil would it be (and is it possible to have a requestRefresh(boolean block) (ie make in not asynch) cagney -> pmuldoon, pretty evil, whats the problem? pmuldoon -> cagney, the initial population of the tree takes take a bit, and one of the things we were pondering is to hide the gui until the requestRefresh() is complete (so the treeview does not draw itself 100s of time on the initial population of all Procs and Tasks) cagney -> pmuldoon, so you need to know when a refresh has completed? pmuldoon => Right now we don't know when requestRefresh is complete because of it's async nature (which is why you see the GUI start up blank for a few seconds) pmuldoon -> cagney, yep cagney -> pmuldoon, that's more straight forward and on the todo- list - all the observers should behave like the current task ones pmuldoon -> cagney, well good ;) I like when I ask for something you've already thought about it/done it/will do it ;) cagney -> pmuldoon, not quiete put right; I think the gui should be able to register a host observer requesting refreshes at a specific rate; and get notified when it is starting / finishing. pmuldoon -> cagney, yes the starting and finishing would be good to sync up. Right now it is a cosmetic problem on startup (ie blank and unresponsive gui on startup due to lots of tree updates for each ProcCreated observable) pmuldoon -> cagney, what we do in the future is wait on the finish event, then do mainWindow.showAll(). That solves the repeated treeview redraws on initial startup pmuldoon s/That solves/That would solve cagney -> pmuldoon, sounds right; the same would apply to updates - on a rapidly changing system the updates should only be pushed at the end cagney -> pmuldoon, can you bug report this? pmuldoon -> cagney, I'm not sure how to word it. Request a finish observer for requestRefresh()? pmuldoon -> I can do that as the title, then copy this irc log to there? cagney -> replace requestRefresh() with Host.requestAddRefreshObserver
well I guess there is kind of good news; I've figured out how to do this (also for Task.requestAddXxxObserver). For every observable:observer pair there is now an Observation object. The synchronized version could block on that object, and then when the core has finished processing, unblock it vis: xxxx() Observation o = new observation (....) send observation to event loop return o.wait () The only restriction is that the method not be called by the EventLoop thread - instant deadlock. Having this will also likely make scripts easier vis: main () { Host = new LinuxHost (); host.refresh (); for (task in host.getTasks ()) task.so something; } of course this isn't an ok for the gui, that needs to be more agressive and use the async mechanisms.
Mark old mechanism as dead: Index: frysk-core/frysk/bindir/ChangeLog 2006-01-31 Andrew Cagney <cagney@redhat.com> * ftrace.java: Update, use renamed observableProcAddedXXX, and observableProcRemovedXXX. Index: frysk-core/frysk/proc/ChangeLog 2006-01-31 Andrew Cagney <cagney@redhat.com> * Host.java (observableProcAddedXXX): Rename observableProcAdded. (observableProcRemovedXXX): Rename observableProcRemoved. (observableTaskAddedXXX): Rename observableTaskAdded. (observableTaskRemovedXXX): Rename observableTaskRemoved. * Proc.java: Update. * TestI386Modify.java: Update. * TestI386Regs.java: Update. * TestLib.java: Update. * TestModify.java: Update. * TestRefresh.java: Update. * TestSyscall.java: Update. * TestSyscall2.java: Update. * TestSyscallInterrupt.java: Update. * TestSyscallOpen.java: Update. Index: frysk-gui/frysk/gui/monitor/ChangeLog 2006-01-31 Andrew Cagney <cagney@redhat.com> * ProcDataModel.java: Update, use renamed observableProcAddedXXX, and observableProcRemovedXXX.
Index: frysk-core/frysk/proc/ChangeLog 2006-02-01 Andrew Cagney <cagney@redhat.com> * Host.java (requestRefreshXXX(boolean)): Rename requestRefresh. (requestRefresh()): Delete. * TestSyscallInterrupt.java: Update. * TestRefresh.java: Update. * TestLib.java: Update. Index: frysk-gui/frysk/gui/monitor/ChangeLog 2006-02-01 Andrew Cagney <cagney@redhat.com> * ProcDataModel.java: Update, use .requestRefreshXXX instead of .requestRefresh.
*** Bug 4310 has been marked as a duplicate of this bug. ***