This is the mail archive of the frysk@sources.redhat.com mailing list for the frysk 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]

Re: Minutes 20070516


Mark Wielaard wrote:


I don't believe anything changed here since it was implemented. Which
doesn't mean it cannot/shouldn't be improved (now that it is implemented
I see why you want to have it setup differently, isn't that always the
case...). Here is how it currently works:


- Given a Task you call requestAddCodeObserver(TaskObserver.Code, long)
where the address is given as a long and the Code observer is the
listener that you want to be called whenever the Task hits the given
address.

The call is task specific, that is task.requestAddCodeObserver (TaskObserver.Code, <address>) adds an observer to just that task and hence the observer is only notified when that code address is reached for that specific task. This is consistent with the other task-specific observers where, unless an observer is explicitly attached to a task, it isn't notified of that task's events. Doing this opens the way for a low-level efficient filtering of these events (eventually embedded in the kernel even); and to allow find-grained selection of ISA specific methods.


Perhaps this isn't the most suitable initial model though? For instance, instead we could implement a global breakpoint mechanism, proc.addCodeObserver(..., <addr>) say, bound to the process, that assumes that the process has a single ISA, and thread-global so any thread encountering the code-address will do a notification.

Andrew

- This inserts a breakpoint at the given address in the Proc associated
with the Task (the breakpoint is global since the address space is
shared between Tasks).
- Whenever the breakpoint is hit in the process by a Task that task is
temporarily suspended and frysk-core is notified about the event.
- frysk-core calls the given Code observer is called with updateHit
(Task, long) indicating the Task that tripped over the breakpoint at a
given address. Returning Action.BLOCK from that method will permanently
block that Task, returning Action.CONTINUE the Task will be resumed
(given that no other listener returned BLOCK).



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