2010-12-07 11:31:57 +00:00
|
|
|
// Copyright 2010 the V8 project authors. All rights reserved.
|
2014-04-29 06:42:26 +00:00
|
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
|
|
// found in the LICENSE file.
|
2010-12-07 11:31:57 +00:00
|
|
|
|
|
|
|
#ifndef V8_V8_TEST_H_
|
|
|
|
#define V8_V8_TEST_H_
|
|
|
|
|
2015-09-03 07:55:53 +00:00
|
|
|
#include "v8.h" // NOLINT(build/include)
|
2010-12-07 11:31:57 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Testing support for the V8 JavaScript engine.
|
|
|
|
*/
|
|
|
|
namespace v8 {
|
|
|
|
|
2013-08-06 14:37:35 +00:00
|
|
|
class V8_EXPORT Testing {
|
2010-12-07 11:31:57 +00:00
|
|
|
public:
|
|
|
|
enum StressType {
|
|
|
|
kStressTypeOpt,
|
|
|
|
kStressTypeDeopt
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the type of stressing to do. The default if not set is kStressTypeOpt.
|
|
|
|
*/
|
|
|
|
static void SetStressRunType(StressType type);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get the number of runs of a given test that is required to get the full
|
|
|
|
* stress coverage.
|
|
|
|
*/
|
|
|
|
static int GetStressRuns();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicate the number of the run which is about to start. The value of run
|
|
|
|
* should be between 0 and one less than the result from GetStressRuns()
|
|
|
|
*/
|
|
|
|
static void PrepareStressRun(int run);
|
2011-03-10 13:58:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Force deoptimization of all functions.
|
|
|
|
*/
|
2015-11-30 08:16:35 +00:00
|
|
|
static void DeoptimizeAll(Isolate* isolate);
|
2010-12-07 11:31:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace v8
|
|
|
|
|
|
|
|
#endif // V8_V8_TEST_H_
|