http://codereview.chromium.org/4000007/diff/1/2
File src/platform-linux.cc (right):

http://codereview.chromium.org/4000007/diff/1/2#newcode801
src/platform-linux.cc:801: vm_thread_pid_(syscall (SYS_gettid)) {
Please document that libc doesn't provide wrappers for gettid and
tgkill. Also nit: is the extra space after "syscall" required?

http://codereview.chromium.org/4000007/diff/1/2#newcode807
src/platform-linux.cc:807: for ( ; sampler_->IsActive();
usleep(sampler_->interval_ * 1000 - 100)) {
I think "while" loop is more readable here. Also we should check that
usleep returns 0 or EINTR, everything else is a bug.

http://codereview.chromium.org/4000007/diff/1/2#newcode815
src/platform-linux.cc:815: struct itimerval old_timer_value_;
Remove.

http://codereview.chromium.org/4000007/diff/1/2#newcode817
src/platform-linux.cc:817: int vm_thread_pid_;
vm_thread_tid_ or maybe vm_tgid_ and vm_tid_?

http://codereview.chromium.org/4000007/diff/1/2#newcode857
src/platform-linux.cc:857: active_ = true;
Add a comment like "Start a sender thread to periodically send profiling
signals to the VM thread".

http://codereview.chromium.org/4000007/diff/1/2#newcode858
src/platform-linux.cc:858: pthread_attr_t sched_attr;
Passing NULL attr should be equivalent to the default attrs.

http://codereview.chromium.org/4000007/diff/1/2#newcode860
src/platform-linux.cc:860: pthread_create(&data_->signal_sender_thread_,
&sched_attr, SenderEntry, data_);
80 chars.

http://codereview.chromium.org/4000007/diff/1/2#newcode863
src/platform-linux.cc:863: active_sampler_ = this;
I don't understand the connection between active_ and active_sampler_.
Sampler::Start() seems to support the existence of other samplers and
returns early, but Sampler::Stop() always joins the sender thread.

http://codereview.chromium.org/4000007/diff/1/2#newcode874
src/platform-linux.cc:874: setitimer(ITIMER_PROF,
&data_->old_timer_value_, NULL);
Remove.

http://codereview.chromium.org/4000007/show

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to