> On Jan. 15, 2016, 6:17 a.m., Till Toenshoff wrote: > > src/tests/environment.cpp, line 322 > > > > > > This grepping for `cycles` seems dangerous assuming that we need `cpu-cycles` support (aka `cycles`) when considering that there are also things like e.g. `ref-cycles` which I believe we are not relying on. > > > > Test-output of a box I tried: > > ``` > > $ perf list hw > > cpu-cycles OR cycles [Hardware event] > > instructions [Hardware event] > > cache-references [Hardware event] > > cache-misses [Hardware event] > > branch-instructions OR branches [Hardware event] > > branch-misses [Hardware event] > > bus-cycles [Hardware event] > > ref-cycles [Hardware event] > > ``` > > > > Test-output of a VM I tried: > > ``` > > $ perf list hw > > ref-cycles [Hardware event] > > ``` > > > > More on that on https://issues.apache.org/jira/browse/MESOS-3082?focusedCommentId=15101208&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15101208 You're right! I wasn't aware of other hardware events that have `cycles` in their name. Should have had a better look at the documentation. Instead of grepping for `cycles`, let's grep for `cpu-cycles` instead, as this is a unique identifier in this list. The tests covered by this filter only sample this event, currently no other hardware events are sampled by any of the other tests. - Jan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/42197/#review114659 ----------------------------------------------------------- On Jan. 14, 2016, 4:28 p.m., Jan Schlicht wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/42197/ > ----------------------------------------------------------- > > (Updated Jan. 14, 2016, 4:28 p.m.) > > > Review request for mesos, Benjamin Bannier and Till Toenshoff. > > > Bugs: MESOS-3082 > https://issues.apache.org/jira/browse/MESOS-3082 > > > Repository: mesos > > > Description > ------- > > Virtual machines may not always support 'CPU performance counters'. Tests > trying to collect to 'cycle' value of 'perf' will fail under these > circumstances. This will be avoided by disabling these tests if 'perf' hardware > events are not available. > > > Diffs > ----- > > src/tests/environment.cpp 20218a086baefcefb310eb45ed9024e5425ce787 > > Diff: https://reviews.apache.org/r/42197/diff/ > > > Testing > ------- > > Running `sudo ./bin/mesos-tests.sh --gtest_filter="*ROOT_CGROUPS_Perf:*ROOT_CGROUPS_Sample:*ROOT_CGROUPS_UserCgroup:*CGROUPS_ROOT_PerfRollForward:*ROOT_Sample"` > > 1) In a Linux VM without 'CPU performance counters': This doesn't run the tests and shows an error message that 'cycles' is not available, as expected > 2) In a Linux VM without 'perf': This doesn't run the tests and shows an error message that 'perf' is not installed, as expected > 3) On OSX: This doesn't run the tests and shows an error message that 'perf' is not available, as expected > 4) NOT TESTED YET!!! On native Linux (i.e. with 'CPU performance counters'): This runs the tests. > > > Thanks, > > Jan Schlicht > >