https://codereview.chromium.org/424973004/diff/120001/src/cpu-profiler.cc
File src/cpu-profiler.cc (right):

https://codereview.chromium.org/424973004/diff/120001/src/cpu-profiler.cc#newcode261
src/cpu-profiler.cc:261: if (shared->script()->IsScript()) {
I reused the same pattern as
CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, Code* code,
SharedFunctionInfo* shared, CompilationInfo* info, Name* script_name)
has.
It does the same check. Is it OK?

On 2014/08/15 12:10:47, alph wrote:
Is it possible the shared->script() is not a Script? I see previously
it was not
the case.

https://codereview.chromium.org/424973004/diff/120001/src/profile-generator.h
File src/profile-generator.h (right):

https://codereview.chromium.org/424973004/diff/120001/src/profile-generator.h#newcode58
src/profile-generator.h:58:
pc_offset_map_.insert(std::make_pair(pc_offset, line));
SetPosition is called during code generation. GetSourceLineNumber is
called after the code is generated and line info table is built. Could
you please clarify what kind of optimization are your talking about?

On 2014/08/15 12:10:47, alph wrote:
a possible optimization: you don't need to bloat it with a new entry
if
lower_bound for the pc_offset does already return line.

https://codereview.chromium.org/424973004/

--
--
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