[webkit-dev] get an index of array in JSC
Filip Pizlo
fpizlo at apple.com
Sat Apr 26 08:52:47 PDT 2014
There are multiple code paths for accessing arrays, including the assembly in the LLInt but also the code in JSObject. You could instrument all of it if you wanted to.
-Filip
> On Apr 26, 2014, at 6:09 AM, wei wang <flyingwei1986 at gmail.com> wrote:
>
> Hello,
>
> I wonder, is it possible to profile every read/write to an array?
> More specifically, how to get the index of JSArray according to each read/write?
>
> Here is an example, consider the following js statement,
>
> b = a[1],
>
> I find that there are three relevant bytecode statements for "reading a[1]",
>
>
> resolve_scope --- that is, a
> get_from_scope --- get a's address, possibly
> get_by_val --- get 1
>
>
> By following the LLint using GDB, I cannot find the corresponding methods in JSArray for accessing the value of a[1]. It seems that a[1] is accessed directly using the offset. Any suggestion will be helpful. Thanks!
>
>
> Wei
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
More information about the webkit-dev
mailing list