The first part of this is easy: the existing --trace flag traces all
function calls. If printing to stdout is not what you need, you can at
least grep for FLAG_trace in the code to see where you'd have to add your
own code.

The second part, logging all accessed properties, seems considerably harder
-- I'm not sure how to do it. As a start, you can turn off ICs, and add
code to the RUNTIME_FUNCTIONs you see in ic.cc. But that leaves a bunch of
implicit property loads inside built-in functions, and those don't go
through any common bottlenecks, so you'd have to find them all by hand.
It's going to be a lot of work.

On Wed, Apr 15, 2020 at 9:20 AM <jun52...@gmail.com> wrote:

> Hello,
>
> For research reason, I need to log all the function names and properties
> accessed from javascript. Given the below example code from a webpage:
>
> <script>
>       console.log('test");
>       window.name="new name";
> </script>
>
> I'd like to capture that 'console.log()' and 'window.name' have been
> accessed.
>
>
> I'm quite new to v8 development. I've been struggling with the v8 source
> code in the chromium for a while.
> Could anyone save my life by giving me some hints or code snippets to get
> started?
>
>

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAKSzg3T0qJSaZjRY2gSW%3DnTbjCBV6NAEEXhN9z9WQUjt9URqrg%40mail.gmail.com.

Reply via email to