Home | History | Annotate | Download | only in src
      1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 'use strict';
      6 
      7 /**
      8  * @fileoverview Model is a parsed representation of the
      9  * TraceEvents obtained from base/trace_event in which the begin-end
     10  * tokens are converted into a hierarchy of processes, threads,
     11  * subrows, and slices.
     12  *
     13  * The building block of the model is a slice. A slice is roughly
     14  * equivalent to function call executing on a specific thread. As a
     15  * result, slices may have one or more subslices.
     16  *
     17  * A thread contains one or more subrows of slices. Row 0 corresponds to
     18  * the "root" slices, e.g. the topmost slices. Row 1 contains slices that
     19  * are nested 1 deep in the stack, and so on. We use these subrows to draw
     20  * nesting tasks.
     21  *
     22  */
     23 'use strict';
     24 base.exportTo('tracing', function() {
     25 
     26   var nextGUID = 1;
     27   var GUID = {
     28     allocate: function() {
     29       return nextGUID++;
     30     }
     31   };
     32 
     33   return {
     34     GUID: GUID
     35   };
     36 
     37 });
     38