зеркало из https://github.com/mozilla/pluotsorbet.git
Add thread timeline.
This commit is contained in:
Родитель
ebe8b51277
Коммит
cee17b9ada
|
@ -517,6 +517,10 @@ module J2ME {
|
|||
}
|
||||
|
||||
setAsCurrentContext() {
|
||||
if ($) {
|
||||
threadTimeline && threadTimeline.leave();
|
||||
}
|
||||
threadTimeline && threadTimeline.enter(this.runtime.id + ":" + this.id);
|
||||
$ = this.runtime;
|
||||
if ($.ctx === this) {
|
||||
return;
|
||||
|
@ -526,6 +530,9 @@ module J2ME {
|
|||
}
|
||||
|
||||
clearCurrentContext() {
|
||||
if ($) {
|
||||
threadTimeline && threadTimeline.leave();
|
||||
}
|
||||
$ = null;
|
||||
Context.setWriters(Context.writer);
|
||||
}
|
||||
|
|
1
main.js
1
main.js
|
@ -381,6 +381,7 @@ function requestTimelineBuffers(fn) {
|
|||
if (J2ME.timeline) {
|
||||
fn([
|
||||
J2ME.timeline,
|
||||
J2ME.threadTimeline,
|
||||
J2ME.methodTimeline
|
||||
]);
|
||||
return;
|
||||
|
|
|
@ -102,6 +102,7 @@ module J2ME {
|
|||
|
||||
export var timeline;
|
||||
export var methodTimeline;
|
||||
export var threadTimeline;
|
||||
export var nativeCounter = new Metrics.Counter(true);
|
||||
export var runtimeCounter = new Metrics.Counter(true);
|
||||
export var baselineMethodCounter = new Metrics.Counter(true);
|
||||
|
@ -113,6 +114,7 @@ module J2ME {
|
|||
if (typeof Shumway !== "undefined") {
|
||||
timeline = new Shumway.Tools.Profiler.TimelineBuffer("Runtime");
|
||||
methodTimeline = new Shumway.Tools.Profiler.TimelineBuffer("Methods");
|
||||
threadTimeline = new Shumway.Tools.Profiler.TimelineBuffer("Threads");
|
||||
}
|
||||
|
||||
export function enterTimeline(name: string, data?: any) {
|
||||
|
|
|
@ -269,7 +269,7 @@ form[role="dialog"][data-type="confirm"].lcdui-alert section {
|
|||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
bottom: 256px;
|
||||
bottom: 512px;
|
||||
}
|
||||
|
||||
#profilerContainer {
|
||||
|
@ -282,7 +282,7 @@ form[role="dialog"][data-type="confirm"].lcdui-alert section {
|
|||
left: 0px;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
height: 256px;
|
||||
height: 512px;
|
||||
}
|
||||
|
||||
#profilerToolbar {
|
||||
|
|
Загрузка…
Ссылка в новой задаче