76a209487303105ffc09eb4248bf2f3518885007
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
.tracecompass
.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
25 public final class RootScope
extends LexicalScope
{
28 * The scope constructor
36 public ILexicalScope
getChild(String name
) {
38 * This happens ~40 % of the time
40 if (name
.equals(EVENT_HEADER
.getPath())) {
44 * This happens ~30 % of the time
46 if (name
.equals(FIELDS
.getPath())) {
50 * This happens ~30 % of the time
52 if (name
.equals(CONTEXT
.getPath())) {
56 * This happens ~1 % of the time
58 if (name
.equals(PACKET_HEADER
.getPath())) {
61 return super.getChild(name
);
This page took 0.049026 seconds and 4 git commands to generate.