1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/src/perf/pm_stub.cpp Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,63 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#include "perf/jsperf.h" 1.10 + 1.11 +namespace JS { 1.12 + 1.13 +PerfMeasurement::PerfMeasurement(PerfMeasurement::EventMask) 1.14 + : impl(0), 1.15 + eventsMeasured(EventMask(0)), 1.16 + cpu_cycles(-1), 1.17 + instructions(-1), 1.18 + cache_references(-1), 1.19 + cache_misses(-1), 1.20 + branch_instructions(-1), 1.21 + branch_misses(-1), 1.22 + bus_cycles(-1), 1.23 + page_faults(-1), 1.24 + major_page_faults(-1), 1.25 + context_switches(-1), 1.26 + cpu_migrations(-1) 1.27 +{ 1.28 +} 1.29 + 1.30 +PerfMeasurement::~PerfMeasurement() 1.31 +{ 1.32 +} 1.33 + 1.34 +void 1.35 +PerfMeasurement::start() 1.36 +{ 1.37 +} 1.38 + 1.39 +void 1.40 +PerfMeasurement::stop() 1.41 +{ 1.42 +} 1.43 + 1.44 +void 1.45 +PerfMeasurement::reset() 1.46 +{ 1.47 + cpu_cycles = -1; 1.48 + instructions = -1; 1.49 + cache_references = -1; 1.50 + cache_misses = -1; 1.51 + branch_instructions = -1; 1.52 + branch_misses = -1; 1.53 + bus_cycles = -1; 1.54 + page_faults = -1; 1.55 + major_page_faults = -1; 1.56 + context_switches = -1; 1.57 + cpu_migrations = -1; 1.58 +} 1.59 + 1.60 +bool 1.61 +PerfMeasurement::canMeasureSomething() 1.62 +{ 1.63 + return false; 1.64 +} 1.65 + 1.66 +} // namespace JS