OpenCoverage

qqmlmemoryprofiler.cpp

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/qtdeclarative/src/qtdeclarative/src/qml/debugger/qqmlmemoryprofiler.cpp
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5QQmlMemoryScope::LibraryState QQmlMemoryScope::state = QQmlMemoryScope::Unloaded;-
6-
7typedef void (qmlmemprofile_stats)(int *allocCount, int *bytesAllocated);-
8typedef void (qmlmemprofile_clear)();-
9typedef void (qmlmemprofile_enable)();-
10typedef void (qmlmemprofile_disable)();-
11typedef void (qmlmemprofile_push_location)(const char *filename, int lineNumber);-
12typedef void (qmlmemprofile_pop_location)();-
13typedef void (qmlmemprofile_save)(const char *filename);-
14typedef int (qmlmemprofile_is_enabled)();-
15-
16static qmlmemprofile_stats *memprofile_stats;-
17static qmlmemprofile_clear *memprofile_clear;-
18static qmlmemprofile_enable *memprofile_enable;-
19static qmlmemprofile_disable *memprofile_disable;-
20static qmlmemprofile_push_location *memprofile_push_location;-
21static qmlmemprofile_pop_location *memprofile_pop_location;-
22static qmlmemprofile_save *memprofile_save;-
23static qmlmemprofile_is_enabled *memprofile_is_enabled;-
24-
25-
26extern QFunctionPointer qt_linux_find_symbol_sys(const char *symbol);-
27-
28-
29bool QQmlMemoryScope::doOpenLibrary()-
30{-
31-
32 if (state == Unloaded
state == UnloadedDescription
TRUEevaluated 336 times by 152 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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
  • tst_qqmlenginedebugservice
  • ...
FALSEnever evaluated
) {
0-336
33 memprofile_stats = (qmlmemprofile_stats *) qt_linux_find_symbol_sys("qmlmemprofile_stats");-
34 memprofile_clear = (qmlmemprofile_clear *) qt_linux_find_symbol_sys("qmlmemprofile_clear");-
35 memprofile_enable = (qmlmemprofile_enable *) qt_linux_find_symbol_sys("qmlmemprofile_enable");-
36 memprofile_disable = (qmlmemprofile_disable *) qt_linux_find_symbol_sys("qmlmemprofile_disable");-
37 memprofile_push_location = (qmlmemprofile_push_location *) qt_linux_find_symbol_sys("qmlmemprofile_push_location");-
38 memprofile_pop_location = (qmlmemprofile_pop_location *) qt_linux_find_symbol_sys("qmlmemprofile_pop_location");-
39 memprofile_save = (qmlmemprofile_save *) qt_linux_find_symbol_sys("qmlmemprofile_save");-
40 memprofile_is_enabled = (qmlmemprofile_is_enabled *) qt_linux_find_symbol_sys("qmlmemprofile_is_enabled");-
41-
42 if (memprofile_stats
memprofile_statsDescription
TRUEnever evaluated
FALSEevaluated 336 times by 152 tests
Evaluated by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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
  • tst_qqmlenginedebugservice
  • ...
&& memprofile_clear
memprofile_clearDescription
TRUEnever evaluated
FALSEnever evaluated
&& memprofile_enable
memprofile_enableDescription
TRUEnever evaluated
FALSEnever evaluated
&& memprofile_disable
memprofile_disableDescription
TRUEnever evaluated
FALSEnever evaluated
&&
0-336
43 memprofile_push_location
memprofile_push_locationDescription
TRUEnever evaluated
FALSEnever evaluated
&& memprofile_pop_location
memprofile_pop_locationDescription
TRUEnever evaluated
FALSEnever evaluated
&& memprofile_save
memprofile_saveDescription
TRUEnever evaluated
FALSEnever evaluated
&& memprofile_is_enabled
memprofile_is_enabledDescription
TRUEnever evaluated
FALSEnever evaluated
)
0
44 state = Loaded;
never executed: state = Loaded;
0
45 else-
46 state = Failed;
executed 336 times by 152 tests: state = Failed;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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
  • tst_qqmlenginedebugservice
  • ...
336
47 }-
48-
49-
50 return
executed 336 times by 152 tests: return state == Loaded;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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
  • tst_qqmlenginedebugservice
  • ...
state == Loaded;
executed 336 times by 152 tests: return state == Loaded;
Executed by:
  • tst_bindingdependencyapi
  • tst_drawingmodes
  • 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
  • tst_qqmlenginedebugservice
  • ...
336
51}-
52-
53void QQmlMemoryScope::init(const char *string)-
54{-
55 if (memprofile_is_enabled()
memprofile_is_enabled()Description
TRUEnever evaluated
FALSEnever evaluated
) {
0
56 memprofile_push_location(string, 0);-
57 pushed = true;-
58 }
never executed: end of block
0
59}
never executed: end of block
0
60-
61void QQmlMemoryScope::done()-
62{-
63 memprofile_pop_location();-
64}
never executed: end of block
0
65-
66bool QQmlMemoryProfiler::isEnabled()-
67{-
68 if (QQmlMemoryScope::openLibrary()
QQmlMemoryScope::openLibrary()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
69 return
never executed: return memprofile_is_enabled();
memprofile_is_enabled();
never executed: return memprofile_is_enabled();
0
70-
71 return
never executed: return false;
false;
never executed: return false;
0
72}-
73-
74void QQmlMemoryProfiler::enable()-
75{-
76 if (QQmlMemoryScope::openLibrary()
QQmlMemoryScope::openLibrary()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
77 memprofile_enable();
never executed: memprofile_enable();
0
78}
never executed: end of block
0
79-
80void QQmlMemoryProfiler::disable()-
81{-
82 if (QQmlMemoryScope::openLibrary()
QQmlMemoryScope::openLibrary()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
83 memprofile_disable();
never executed: memprofile_disable();
0
84}
never executed: end of block
0
85-
86void QQmlMemoryProfiler::clear()-
87{-
88 if (QQmlMemoryScope::openLibrary()
QQmlMemoryScope::openLibrary()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
89 memprofile_clear();
never executed: memprofile_clear();
0
90}
never executed: end of block
0
91-
92void QQmlMemoryProfiler::stats(int *allocCount, int *bytesAllocated)-
93{-
94 if (QQmlMemoryScope::openLibrary()
QQmlMemoryScope::openLibrary()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
95 memprofile_stats(allocCount, bytesAllocated);
never executed: memprofile_stats(allocCount, bytesAllocated);
0
96}
never executed: end of block
0
97-
98void QQmlMemoryProfiler::save(const char *filename)-
99{-
100 if (QQmlMemoryScope::openLibrary()
QQmlMemoryScope::openLibrary()Description
TRUEnever evaluated
FALSEnever evaluated
)
0
101 memprofile_save(filename);
never executed: memprofile_save(filename);
0
102}
never executed: end of block
0
103-
104-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.2.0