Hi Daniel, Mikhail,
I believe this is ready for submit, provided you're OK with fixing GDBJit
and
the remaining nits in a followup CL.
In this revision I've fixed compilation under gcc, and fixed a test failure
I
wasn't seeing on Windows where V8 was unhappy about a handle scope
outliving the
isolate.
I've also addressed the API docs and added TODOs to clean up the CodeEvent
interface with the GDBJit fix.
Please take another look...
Siggi
https://chromiumcodereview.appspot.com/10795074/diff/1018/src/code-events.h
File src/code-events.h (right):
https://chromiumcodereview.appspot.com/10795074/diff/1018/src/code-events.h#newcode53
src/code-events.h:53: static void AddCode(Handle<String> name,
On 2012/07/25 13:50:42, danno wrote:
I find it a little odd that this interface takes both handles and raw
pointers.
You probably should be uniform in the API, using all Handles or all
pointers.
Since you call this from pointer-based code, you probably should keep
everything
pointer-based, since calling handle-based APIs from pointer-based code
is
generally not a good idea.
Added TODO to clean this up with the GDBJit fix.
https://chromiumcodereview.appspot.com/10795074/diff/4001/include/v8.h
File include/v8.h (right):
https://chromiumcodereview.appspot.com/10795074/diff/4001/include/v8.h#newcode3256
include/v8.h:3256: * notified each time code is added, moved or removed.
On 2012/07/25 14:43:48, Mikhail Naganov (Chromium) wrote:
On 2012/07/25 14:38:35, Sigurður Ásgeirsson wrote:
> On 2012/07/25 14:22:12, Mikhail Naganov (Chromium) wrote:
> > There is a problem with code objects that were created before the
handler
has
> > been set. For V8's profiler we walk the heap in order to enumerate
them
prior
> to
> > hooking on events. Otherwise, the client will be receiving code
move events
> for
> > objects he doesn't know anything about.
> >
> > Or you need to require that the client must set the handler in the
very
> > beginning.
>
> This is true - for the use case I have in mind, there's no problem
simply
> requiring that the hook is instated before initializing V8.
> Do you have other use cases in mind here?
> Would you like me to change the API, the documentation or both, and
if so,
how?
For me, just stating this in the doc would be fine. If in the future
this
restriction will be removed by adding scanning of current code objects
on
handler installation, this wouldn't affect clients that install the
handler from
the beginning.
Done.
https://chromiumcodereview.appspot.com/10795074/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev