OpenCoverage

qv4executableallocator_p.h

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/jsruntime/qv4executableallocator_p.h
Switch to Source codePreprocessed file
LineSourceCount
1-
2namespace WTF {-
3class PageAllocation;-
4}-
5-
6-
7-
8namespace QV4 {-
9-
10class __attribute__((visibility("default"))) ExecutableAllocator-
11{-
12public:-
13 struct ChunkOfPages;-
14 struct Allocation;-
15-
16 ExecutableAllocator();-
17 ~ExecutableAllocator();-
18-
19 Allocation *allocate(size_t size);-
20 void free(Allocation *allocation);-
21-
22 struct Allocation-
23 {-
24 Allocation()-
25 : size(0)-
26 , free(true)-
27 {}
executed 1260688 times by 154 tests: end of block
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
1260688
28-
29 void *start() const;-
30 void invalidate() { addr = 0; }
never executed: end of block
0
31 bool isValid() const { return
executed 1293132 times by 154 tests: return addr != 0;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
addr != 0;
executed 1293132 times by 154 tests: return addr != 0;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • tst_ecmascripttests
  • tst_examples
  • tst_flickableinterop
  • tst_multipointtoucharea_interop
  • tst_parserstress
  • tst_qjsengine
  • tst_qjsonbinding
  • tst_qjsvalue
  • tst_qjsvalueiterator
  • tst_qmlcachegen
  • tst_qmldiskcache
  • tst_qqmlapplicationengine
  • tst_qqmlbinding
  • tst_qqmlcomponent
  • tst_qqmlconnections
  • tst_qqmlconsole
  • tst_qqmlcontext
  • tst_qqmldebugclient
  • tst_qqmldebugjs
  • tst_qqmldebuglocal
  • tst_qqmldebugservice
  • tst_qqmlecmascript
  • tst_qqmlenginecleanup
  • ...
}
1293132
32 void deallocate(ExecutableAllocator *allocator);-
33-
34 private:-
35 ~Allocation() {}-
36-
37 friend class ExecutableAllocator;-
38-
39 Allocation *split(size_t dividingSize);-
40 bool mergeNext(ExecutableAllocator *allocator);-
41 bool mergePrevious(ExecutableAllocator *allocator);-
42-
43 quintptr addr = 0;-
44 uint size : 31;-
45 uint free : 1;-
46 Allocation *next = nullptr;-
47 Allocation *prev = nullptr;-
48 };-
49-
50-
51 int freeAllocationCount() const { return
never executed: return freeAllocations.count();
freeAllocations.count();
never executed: return freeAllocations.count();
}
0
52 int chunkCount() const { return
never executed: return chunks.count();
chunks.count();
never executed: return chunks.count();
}
0
53-
54 struct ChunkOfPages-
55 {-
56 ChunkOfPages()-
57-
58 {}-
59 ~ChunkOfPages();-
60-
61 WTF::PageAllocation *pages = nullptr;-
62 Allocation *firstAllocation = nullptr;-
63-
64 bool contains(Allocation *alloc) const;-
65 };-
66-
67 ChunkOfPages *chunkForAllocation(Allocation *allocation) const;-
68-
69private:-
70 QMultiMap<size_t, Allocation*> freeAllocations;-
71 QMap<quintptr, ChunkOfPages*> chunks;-
72 mutable QMutex mutex;-
73};-
74-
75}-
76-
77-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0