mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-02 07:05:24 +00:00
Add a global slot list to the trace monitor.
This commit is contained in:
parent
a75e5194c0
commit
bcb5cd6a9b
@ -99,6 +99,8 @@ namespace nanojit {
|
||||
class Fragmento;
|
||||
}
|
||||
class TraceRecorder;
|
||||
extern "C++" template<typename T> class Queue;
|
||||
typedef Queue<uint16> SlotList;
|
||||
|
||||
# define CLS(T) T*
|
||||
#else
|
||||
@ -125,6 +127,7 @@ typedef struct JSFragmentCacheEntry {
|
||||
typedef struct JSTraceMonitor {
|
||||
CLS(nanojit::Fragmento) fragmento;
|
||||
CLS(TraceRecorder) recorder;
|
||||
CLS(SlotList) slotList;
|
||||
JSFragmentCacheEntry fcache[JS_FRAGMENT_CACHE_SIZE];
|
||||
} JSTraceMonitor;
|
||||
|
||||
|
@ -2049,11 +2049,13 @@ extern void
|
||||
js_InitJIT(JSTraceMonitor *tm)
|
||||
{
|
||||
if (!tm->fragmento) {
|
||||
JS_ASSERT(!tm->slotList);
|
||||
Fragmento* fragmento = new (&gc) Fragmento(core, 24);
|
||||
verbose_only(fragmento->labels = new (&gc) LabelMap(core, NULL);)
|
||||
fragmento->assm()->setCallTable(builtins);
|
||||
fragmento->pageFree(fragmento->pageAlloc()); // FIXME: prime page cache
|
||||
tm->fragmento = fragmento;
|
||||
tm->slotList = new SlotList();
|
||||
}
|
||||
#if !defined XP_WIN
|
||||
debug_only(memset(&stat, 0, sizeof(stat)));
|
||||
@ -2075,9 +2077,12 @@ js_FinishJIT(JSTraceMonitor *tm)
|
||||
stat.typeMapMismatchAtEntry, stat.globalShapeMismatchAtEntry);
|
||||
#endif
|
||||
if (tm->fragmento != NULL) {
|
||||
JS_ASSERT(tm->slotList);
|
||||
verbose_only(delete tm->fragmento->labels;)
|
||||
delete tm->fragmento;
|
||||
tm->fragmento = NULL;
|
||||
delete tm->slotList;
|
||||
tm->slotList = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user