1 /*******************************************************************************
2 * Copyright (c) 2014 Ericsson
4 * All rights reserved. This program and the accompanying materials are made
5 * available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Matthew Khouzam - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.ctf
.core
.event
.scope
;
15 import org
.eclipse
.jdt
.annotation
.NonNullByDefault
;
16 import org
.eclipse
.jdt
.annotation
.Nullable
;
19 * A lttng specific speedup node a root with accelerated returns for some scopes
22 * @author Matthew Khouzam
26 public class RootScope
extends LexicalScope
{
29 * The scope constructor
32 super(null, ""); //$NON-NLS-1$
37 public LexicalScope
getChild(String name
) {
39 * This happens ~40 % of the time
41 if (name
.equals(EVENT_HEADER
.toString())) {
45 * This happens ~30 % of the time
47 if (name
.equals(FIELDS
.toString())) {
51 * This happens ~30 % of the time
53 if (name
.equals(CONTEXT
.toString())) {
57 * This happens ~1 % of the time
59 if (name
.equals(PACKET_HEADER
.toString())) {
62 return super.getChild(name
);
This page took 0.035043 seconds and 5 git commands to generate.