https://codereview.chromium.org/596533002/diff/140001/include/v8.h
File include/v8.h (right):

https://codereview.chromium.org/596533002/diff/140001/include/v8.h#newcode1434
include/v8.h:1434: size_t frames_count;
On 2014/09/24 14:41:29, loislo wrote:
Can we join together both output structures i.e. the array of frames
and
SampleInfo?

The motivation: the embedder wouldn't be able to do a synchronous post
processing for these data because the restrictions for signal handler.
So with this API the embedder has to have two preallocated buffers.
one for
frames and the other for SampleInfo with frames count and needs to
keep them in
sync.

It could be done the old school way:

struct SampleInfo {
   StateTag vm_state;
   size_t frames_count;
   void* frames[1]; // the actual used size depends on frames_count.
}

It would be quite difficult for the embedder to convert (without
copying) from SampleInfo if it chooses to store the data in a different
format.
E.g. if frames are stored in one buffer and the rest is in another.

The current format seems to be more flexible, as it allows the embedder
to store frames wherever it wants.

https://codereview.chromium.org/596533002/

--
--
v8-dev mailing list
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to