Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Issue 2848683006: Implement the NativeStackSampler for the Mac. (Closed)

Created:
3 years, 7 months ago by Avi (use Gerrit)
Modified:
3 years, 7 months ago
CC:
chromium-reviews, danakj+watch_chromium.org, mac-reviews_chromium.org, vmpstr+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Implement the NativeStackSampler for the Mac. This relands the sampler, but with a very simplified recovery with no fancy stack scanning in case libunwind stops after one frame. BUG=531673 Review-Url: https://codereview.chromium.org/2848683006 Cr-Commit-Position: refs/heads/master@{#469429} Committed: https://chromium.googlesource.com/chromium/src/+/7533f415b244d51ff62f3216c524ad774ca5549e

Patch Set 1 #

Total comments: 2

Patch Set 2 : fix #

Patch Set 3 : min to fix test #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+514 lines, -25 lines) Patch
M base/BUILD.gn View 1 2 5 chunks +11 lines, -1 line 0 comments Download
A base/profiler/native_stack_sampler_mac.cc View 1 2 1 chunk +468 lines, -0 lines 2 comments Download
M base/profiler/native_stack_sampler_win.cc View 2 chunks +6 lines, -11 lines 0 comments Download
M base/profiler/stack_sampling_profiler_unittest.cc View 6 chunks +10 lines, -5 lines 0 comments Download
M chrome/common/stack_sampling_configuration.cc View 2 chunks +19 lines, -8 lines 0 comments Download

Messages

Total messages: 32 (19 generated)
Avi (use Gerrit)
wittman@chromium.org: Please review changes in stack sampler mark@chromium.org: Please review changes in mac stuff thakis@chromium.org: ...
3 years, 7 months ago (2017-04-28 22:18:50 UTC) #4
Mike Wittman
lgtm, with compile fixes https://codereview.chromium.org/2848683006/diff/1/base/profiler/native_stack_sampler_mac.cc File base/profiler/native_stack_sampler_mac.cc (right): https://codereview.chromium.org/2848683006/diff/1/base/profiler/native_stack_sampler_mac.cc#newcode136 base/profiler/native_stack_sampler_mac.cc:136: bool WalkStackFromContext(unw_context_t* unwind_context, nit: remove ...
3 years, 7 months ago (2017-04-28 22:33:10 UTC) #7
Avi (use Gerrit)
https://codereview.chromium.org/2848683006/diff/1/base/profiler/native_stack_sampler_mac.cc File base/profiler/native_stack_sampler_mac.cc (right): https://codereview.chromium.org/2848683006/diff/1/base/profiler/native_stack_sampler_mac.cc#newcode136 base/profiler/native_stack_sampler_mac.cc:136: bool WalkStackFromContext(unw_context_t* unwind_context, On 2017/04/28 22:33:10, Mike Wittman wrote: ...
3 years, 7 months ago (2017-04-28 22:45:55 UTC) #9
Mike Wittman
Looks like we still need enough of the previous code to be able to backtrack ...
3 years, 7 months ago (2017-05-01 18:24:30 UTC) #13
Mark Mentovai
If it’s identical to what I already reviewed minus what you say you removed, then ...
3 years, 7 months ago (2017-05-01 18:40:05 UTC) #14
Avi (use Gerrit)
Mike, ptal. Test works now.
3 years, 7 months ago (2017-05-03 22:45:29 UTC) #19
Mike Wittman
lgtm
3 years, 7 months ago (2017-05-03 22:49:42 UTC) #20
Avi (use Gerrit)
Nico, ping.
3 years, 7 months ago (2017-05-03 22:52:36 UTC) #21
Nico
rs-lgtm
3 years, 7 months ago (2017-05-04 19:35:08 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2848683006/40001
3 years, 7 months ago (2017-05-04 19:37:40 UTC) #26
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/7533f415b244d51ff62f3216c524ad774ca5549e
3 years, 7 months ago (2017-05-04 19:45:32 UTC) #29
Alexei Svitkine (slow)
https://codereview.chromium.org/2848683006/diff/40001/base/profiler/native_stack_sampler_mac.cc File base/profiler/native_stack_sampler_mac.cc (right): https://codereview.chromium.org/2848683006/diff/40001/base/profiler/native_stack_sampler_mac.cc#newcode167 base/profiler/native_stack_sampler_mac.cc:167: strncpy(path, info.dli_fname, PATH_MAX); Drive-by nit: prefer strlcpy over strncpy ...
3 years, 7 months ago (2017-05-04 21:01:30 UTC) #31
Avi (use Gerrit)
3 years, 7 months ago (2017-05-12 15:59:46 UTC) #32
Message was sent while issue was closed.
https://codereview.chromium.org/2848683006/diff/40001/base/profiler/native_st...
File base/profiler/native_stack_sampler_mac.cc (right):

https://codereview.chromium.org/2848683006/diff/40001/base/profiler/native_st...
base/profiler/native_stack_sampler_mac.cc:167: strncpy(path, info.dli_fname,
PATH_MAX);
On 2017/05/04 21:01:30, Alexei Svitkine (slow) wrote:
> Drive-by nit: prefer strlcpy over strncpy as strncpy() doesn't guarantee a
null
> terminator char when hitting the size limit and is less efficient (zeroes the
> full buffer rather until the null terminator).

Addressing in https://codereview.chromium.org/2882453003 .

Powered by Google App Engine
This is Rietveld 408576698