Hi Mythri,

Thanks for your notes.

I've been exploring ic.cc as suggested by Jakob, and I found that in this 
source code:
MaybeHandle<Object> LoadIC::Load(Handle<Object> object, Handle<Name> name) 
{}
The name variable carries the name of the property. For example, for the 
code below,
<script>
      console.log('test");
      window.name="new name";
</script>
I will get "console" and "window" if I print the name variable. By any 
chance do you know how to get log of console.log and name of window.name?





On Wednesday, April 15, 2020 at 10:00:20 AM UTC-7, Mythri Alle wrote:
>
>
>
> On Wed, Apr 15, 2020 at 12:53 PM Jakob Kummerow <jkum...@chromium.org 
> <javascript:>> wrote:
>
>> 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.
>>
>
> Also turn off lazy feedback allocation (--no-lazy-feedback-allocation) 
> along with turning off ICs. Without feedback vectors, we take a slightly 
> different path to load some properties and may not call runtime functions. 
> That still doesn't help with implicit property loads mentioned by Jakob.
>
> On Wed, Apr 15, 2020 at 9:20 AM <jun5...@gmail.com <javascript:>> 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-...@googlegroups.com <javascript:>
>> 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-...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/v8-dev/CAKSzg3T0qJSaZjRY2gSW%3DnTbjCBV6NAEEXhN9z9WQUjt9URqrg%40mail.gmail.com
>>  
>> <https://groups.google.com/d/msgid/v8-dev/CAKSzg3T0qJSaZjRY2gSW%3DnTbjCBV6NAEEXhN9z9WQUjt9URqrg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
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/82f3fc08-ccd6-488b-9a4e-0eb966a01680%40googlegroups.com.

Reply via email to