Lines Matching refs:label
279 * Calculates a top down profile for a node with the specified label.
282 * @param {string} opt_label Node label.
290 * Calculates a bottom up profile for a node with the specified label.
293 * @param {string} opt_label Node label.
304 * @param {string} opt_label Node label.
320 * the specified label. If no name specified, starts from the root.
322 * @param {string} opt_label Starting node label.
334 if (!(node.label in precs)) {
335 precs[node.label] = 0;
337 var nodeLabelIsRootLabel = node.label == rootLabel;
343 var rec = root.findOrAddChild(node.label);
345 if (nodeLabelIsRootLabel || precs[node.label] == 0) {
349 precs[node.label]++;
353 if (node.label == rootLabel || precs[rootLabel] > 0) {
354 precs[node.label]--;
429 * The label of the root node.
468 * label, creates a child node if necessary. If a parent node isn't
471 * @param {string} label Child node label.
473 devtools.profiler.CallTree.prototype.findOrAddChild = function(label) {
474 return this.root_.findOrAddChild(label);
480 * with a given label. E.g. cloning the following call tree on label 'A'
492 * @param {string} label The label of the new root node.
494 devtools.profiler.CallTree.prototype.cloneSubtree = function(label) {
497 if (!parent && node.label != label) {
500 var child = (parent ? parent : subTree).findOrAddChild(node.label);
571 * @param {string} label Node label.
574 devtools.profiler.CallTree.Node = function(label, opt_parent) {
575 this.label = label;
599 * @param {string} label Child node label.
601 devtools.profiler.CallTree.Node.prototype.addChild = function(label) {
602 var child = new devtools.profiler.CallTree.Node(label, this);
603 this.children[label] = child;
631 * Finds an immediate child with the specified label.
633 * @param {string} label Child node label.
635 devtools.profiler.CallTree.Node.prototype.findChild = function(label) {
636 return this.children[label] || null;
641 * Finds an immediate child with the specified label, creates a child
644 * @param {string} label Child node label.
646 devtools.profiler.CallTree.Node.prototype.findOrAddChild = function(label) {
647 return this.findChild(label) || this.addChild(label);