https://codereview.chromium.org/424973004/diff/1/include/v8-profiler.h
File include/v8-profiler.h (right):
https://codereview.chromium.org/424973004/diff/1/include/v8-profiler.h#newcode20
include/v8-profiler.h:20: typedef struct {
struct LineTick, also it can be nested in CpuProfileNode
https://codereview.chromium.org/424973004/diff/1/include/v8-profiler.h#newcode22
include/v8-profiler.h:22: unsigned int line;
Why only line number, column would also be interesting for minfied
sources? Internally you could store map: position -> tick count and
convert positions to (line, column) pairs when returning results.
https://codereview.chromium.org/424973004/diff/1/src/cpu-profiler.cc
File src/cpu-profiler.cc (right):
https://codereview.chromium.org/424973004/diff/1/src/cpu-profiler.cc#newcode262
src/cpu-profiler.cc:262: JITLineInfoTable line_table;
Consider allocating JITLineInfoTable on the heap to avoid additional
copy in CodeEntry constructor.
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.cc
File src/profile-generator.cc (right):
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.cc#newcode217
src/profile-generator.cc:217: e->value = static_cast<char*>(e->value) +
1;
intptr_t
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.cc#newcode379
src/profile-generator.cc:379: int src_line) {
It seems that with per line self tick count it would make sense to also
collect per line total tick counts for each function so that the user
can tell how many ticks we spent inside particular call. In other words
we may need src_line for all frames not only the topmost one. This is a
topic for a separate patch though.
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.cc#newcode691
src/profile-generator.cc:691: bool unresolved_src = (src_line ==
v8::CpuProfileNode::kNoLineNumberInfo) ?
bool unresolved_src = src_line == v8::CpuProfileNode::kNoLineNumberInfo;
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.h
File src/profile-generator.h (right):
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.h#newcode161
src/profile-generator.h:161: int src_line =
v8::CpuProfileNode::kNoLineNumberInfo);
style: wrong alignment
https://codereview.chromium.org/424973004/diff/1/src/profile-generator.h#newcode163
src/profile-generator.h:163: int src_line =
v8::CpuProfileNode::kNoLineNumberInfo);
ditto
https://codereview.chromium.org/424973004/diff/1/test/cctest/test-cpu-profiler.cc
File test/cctest/test-cpu-profiler.cc (right):
https://codereview.chromium.org/424973004/diff/1/test/cctest/test-cpu-profiler.cc#newcode1090
test/cctest/test-cpu-profiler.cc:1090: delete [] entries;
Can be handled using a smart pointer from src/smart-pointers.h
https://codereview.chromium.org/424973004/diff/1/test/cctest/test-cpu-profiler.cc#newcode1185
test/cctest/test-cpu-profiler.cc:1185: TEST(TickLines) {
The test is bound to be flaky like other CPU profiler tests that rely on
statistical data. We need to use something more predictable than a real
profile data collected during test run. Probably some mocked samples or
something else. The tests are already marked
'test-cpu-profiler/*': [PASS, FLAKY],
so please don't add one more that would very likely fail time to time.
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.