X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fthird_party%2Ftrace-viewer%2Fsrc%2Ftracing%2Fimporter%2Ftrace_event_importer.js;h=4ca1fc498277dbf2db25232ec07da9164074fada;hb=ff3e2503a20db9193d323c1d19c38c68004dec4a;hp=92186fbb5e9c96d9f790f2d58ccdbbff55338097;hpb=7338fba38ba696536d1cc9d389afd716a6ab2fe6;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/third_party/trace-viewer/src/tracing/importer/trace_event_importer.js b/src/third_party/trace-viewer/src/tracing/importer/trace_event_importer.js index 92186fb..4ca1fc4 100644 --- a/src/third_party/trace-viewer/src/tracing/importer/trace_event_importer.js +++ b/src/third_party/trace-viewer/src/tracing/importer/trace_event_importer.js @@ -8,15 +8,15 @@ * @fileoverview TraceEventImporter imports TraceEvent-formatted data * into the provided model. */ -base.require('base.quad'); -base.require('tracing.trace_model'); -base.require('tracing.color_scheme'); -base.require('tracing.importer.importer'); -base.require('tracing.trace_model.instant_event'); -base.require('tracing.trace_model.flow_event'); -base.require('tracing.trace_model.counter_series'); +tvcm.require('tvcm.quad'); +tvcm.require('tracing.trace_model'); +tvcm.require('tracing.color_scheme'); +tvcm.require('tracing.importer.importer'); +tvcm.require('tracing.trace_model.instant_event'); +tvcm.require('tracing.trace_model.flow_event'); +tvcm.require('tracing.trace_model.counter_series'); -base.exportTo('tracing.importer', function() { +tvcm.exportTo('tracing.importer', function() { var Importer = tracing.importer.Importer; @@ -245,6 +245,14 @@ base.exportTo('tracing.importer', function() { var slice = thread.sliceGroup.endSlice(event.ts / 1000, event.tts / 1000); + if (event.name && slice.title != event.name) { + this.model_.importWarning({ + type: 'title_match_error', + message: 'Titles do not match. Title is ' + + slice.title + ' in openSlice, and is ' + + event.name + ' in endSlice' + }); + } for (var arg in event.args) { if (slice.args[arg] !== undefined) { this.model_.importWarning({ @@ -417,8 +425,8 @@ base.exportTo('tracing.importer', function() { }, createSubSlices_: function() { - base.iterItems(this.model_.processes, function(pid, process) { - base.iterItems(process.threads, function(tid, thread) { + tvcm.iterItems(this.model_.processes, function(pid, process) { + tvcm.iterItems(process.threads, function(tid, thread) { thread.createSubSlices(); }, this); }, this); @@ -544,7 +552,7 @@ base.exportTo('tracing.importer', function() { subSlice.startThread = events[j - 1].thread; subSlice.endThread = events[j].thread; subSlice.id = id; - subSlice.args = base.concatenateObjects(events[0].event.args, + subSlice.args = tvcm.concatenateObjects(events[0].event.args, targetEvent.event.args); slice.subSlices.push(subSlice); @@ -552,7 +560,7 @@ base.exportTo('tracing.importer', function() { if (events[j].event.ph == 'F' && stepType == 'T') { // The args for the finish event go in the last subSlice. var lastSlice = slice.subSlices[slice.subSlices.length - 1]; - lastSlice.args = base.concatenateObjects(lastSlice.args, + lastSlice.args = tvcm.concatenateObjects(lastSlice.args, event.args); } } @@ -763,7 +771,7 @@ base.exportTo('tracing.importer', function() { }, createImplicitObjects_: function() { - base.iterItems(this.model_.processes, function(pid, process) { + tvcm.iterItems(this.model_.processes, function(pid, process) { this.createImplicitObjectsForProcess_(process); }, this); }, @@ -875,7 +883,7 @@ base.exportTo('tracing.importer', function() { }, joinObjectRefs_: function() { - base.iterItems(this.model_.processes, function(pid, process) { + tvcm.iterItems(this.model_.processes, function(pid, process) { this.joinObjectRefsForProcess_(process); }, this); }, @@ -883,7 +891,7 @@ base.exportTo('tracing.importer', function() { joinObjectRefsForProcess_: function(process) { // Iterate the world, looking for id_refs var patchupsToApply = []; - base.iterItems(process.threads, function(tid, thread) { + tvcm.iterItems(process.threads, function(tid, thread) { thread.asyncSliceGroup.slices.forEach(function(item) { this.searchItemForIDRefs_( patchupsToApply, process.objects, 'start', item); @@ -935,7 +943,7 @@ base.exportTo('tracing.importer', function() { if ((object instanceof tracing.trace_model.ObjectSnapshot) || (object instanceof Float32Array) || - (object instanceof base.Quad)) + (object instanceof tvcm.Quad)) return; if (object instanceof Array) {