Re: [PATCH 2/3] skip_prolgoue (amd64)

Doug Evans
2013-12-04T18:31:58Z

On Wed, Dec 4, 2013 at 7:38 AM, Tom Tromey <tromey@redhat.com> wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
> Pedro> Actually "non-stop", vs "all-stop" here isn't the ideal
> Pedro> predicate. The real predicate is "is any thread running".
> Pedro> "non-stop" is just being currently used in
> Pedro> prepare_execute_command as proxy for that, just because
> Pedro> that was the easiest.
>
> It seemed to me that the predicate must be "is any thread associated
> with this particular address space running?" -- but I wanted to ask if
> that makes sense, or if that was what you meant. This idea seems to
> open the door to finer-grained cache flushing.

It would be unfortunate to take an unnecessary perf hit when doing a
backtrace and then browsing the stack, or setting a breakpoint in
non-stop mode when, for example, I'm stopped in some thread for
whatever reason (and then other threads happen to have their own
events).

I think some kind of finer-grained flushing *could* be reasonable.
Implementing it may then make the cache "look like" it is a stack
cache and code cache. 1/2 :-)
[One could do something like record in each line an attribute
describing how/where it came from.]