----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/37045/#review94278 -----------------------------------------------------------
Ship it! Will get this committed now, thanks! I've made some comments so that you can see what I've changed before committing. src/linux/perf.cpp (lines 294 - 297) <https://reviews.apache.org/r/37045/#comment148831> This is where case 3 of wrapping is ok in the style guide. src/linux/perf.cpp (line 300) <https://reviews.apache.org/r/37045/#comment148832> Looks like this isn't indented right? Seems to be even less indentation than the body of `sample`.. also note from the style guide that the brace goes on the line above. src/linux/perf.cpp (lines 301 - 325) <https://reviews.apache.org/r/37045/#comment148834> I'd suggest wrapping these cases all together with an Option<Error> and doing the promise failure / termination once if error.isSome, e.g.: ``` Option<Error> error; if (...) { error = ...; } else if (...) { error = ...; } else if (...) { error = ...; } if (error.isSome()) { promise.fail(error.get().message); terminate(self()); return; } ``` src/linux/perf.cpp (line 322) <https://reviews.apache.org/r/37045/#comment148833> Whoops, don't you want the same discarded logic here? Otherwise, failure() would crash. - Ben Mahler On Aug. 5, 2015, 6:23 p.m., Paul Brett wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/37045/ > ----------------------------------------------------------- > > (Updated Aug. 5, 2015, 6:23 p.m.) > > > Review request for mesos and Ben Mahler. > > > Bugs: MESOS-2834 > https://issues.apache.org/jira/browse/MESOS-2834 > > > Repository: mesos > > > Description > ------- > > Convert Linux perf sampler to use process:await(). > > > Diffs > ----- > > src/linux/perf.cpp 697b75e846a43d4f106ad8f39a18882836d7dc02 > > Diff: https://reviews.apache.org/r/37045/diff/ > > > Testing > ------- > > sudo make check > > > Thanks, > > Paul Brett > >