summaryrefslogtreecommitdiffstats
path: root/js/src/gdb/tests/test-ExecutableAllocator.cpp
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /js/src/gdb/tests/test-ExecutableAllocator.cpp
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/gdb/tests/test-ExecutableAllocator.cpp')
-rw-r--r--js/src/gdb/tests/test-ExecutableAllocator.cpp44
1 files changed, 44 insertions, 0 deletions
diff --git a/js/src/gdb/tests/test-ExecutableAllocator.cpp b/js/src/gdb/tests/test-ExecutableAllocator.cpp
new file mode 100644
index 000000000..7cb7ad364
--- /dev/null
+++ b/js/src/gdb/tests/test-ExecutableAllocator.cpp
@@ -0,0 +1,44 @@
+#include "gdb-tests.h"
+#include "jsapi.h"
+
+#include "jscntxt.h"
+
+#include "jit/ExecutableAllocator.h"
+
+FRAGMENT(ExecutableAllocator, empty) {
+ using namespace js::jit;
+ ExecutableAllocator execAlloc(cx->runtime());
+
+ breakpoint();
+
+ (void) execAlloc;
+}
+
+FRAGMENT(ExecutableAllocator, onepool) {
+ using namespace js::jit;
+ ExecutablePool* pool = nullptr;
+ ExecutableAllocator execAlloc(cx->runtime());
+ execAlloc.alloc(16 * 1024, &pool, BASELINE_CODE);
+
+ breakpoint();
+
+ (void) pool;
+ (void) execAlloc;
+}
+
+FRAGMENT(ExecutableAllocator, twopools) {
+ using namespace js::jit;
+ ExecutablePool* init = nullptr;
+ ExecutablePool* pool = nullptr;
+ ExecutableAllocator execAlloc(cx->runtime());
+
+ execAlloc.alloc(16 * 1024, &init, BASELINE_CODE);
+
+ do { // Keep allocating until we get a second pool.
+ execAlloc.alloc(32 * 1024, &pool, ION_CODE);
+ } while (pool == init);
+
+ breakpoint();
+
+ (void) execAlloc;
+}