TMF: Consolidate some view code into the AbstractTimeGraphView
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng2.kernel.ui / src / org / eclipse / linuxtools / internal / lttng2 / kernel / ui / views / controlflow / ControlFlowEntry.java
1 /*******************************************************************************
2 * Copyright (c) 2012, 2013 Ericsson, École Polytechnique de Montréal
3 *
4 * All rights reserved. This program and the accompanying materials are
5 * made 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
8 *
9 * Contributors:
10 * Patrick Tasse - Initial API and implementation
11 * Geneviève Bastien - Move code to provide base classes for time graph view
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow;
15
16 import org.eclipse.linuxtools.lttng2.kernel.core.trace.LttngKernelTrace;
17 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeGraphEntry;
18
19 /**
20 * An entry in the Control Flow view
21 */
22 public class ControlFlowEntry extends TimeGraphEntry {
23
24 private final int fThreadId;
25 private final int fParentThreadId;
26 private final int fThreadQuark;
27
28 /**
29 * Constructor
30 *
31 * @param quark
32 * The attribute quark matching the thread
33 * @param trace
34 * The trace on which we are working
35 * @param execName
36 * The exec_name of this entry
37 * @param threadId
38 * The TID of the thread
39 * @param parentThreadId
40 * the Parent_TID of this thread
41 * @param startTime
42 * The start time of this process's lifetime
43 * @param endTime
44 * The end time of this process
45 */
46 public ControlFlowEntry(int quark, LttngKernelTrace trace, String execName, int threadId, int parentThreadId, long startTime, long endTime) {
47 super(quark, trace, execName, startTime, endTime);
48 fThreadId = threadId;
49 fParentThreadId = parentThreadId;
50 fThreadQuark = quark;
51 }
52
53 /**
54 * Get this entry's thread ID
55 *
56 * @return The TID
57 */
58 public int getThreadId() {
59 return fThreadId;
60 }
61
62 @Override
63 public LttngKernelTrace getTrace() {
64 return (LttngKernelTrace) super.getTrace();
65 }
66
67 /**
68 * Get this thread's parent TID
69 *
70 * @return The "PTID"
71 */
72 public int getParentThreadId() {
73 return fParentThreadId;
74 }
75
76 /**
77 * Get the quark of the attribute matching this thread's TID
78 *
79 * @return The quark
80 */
81 public int getThreadQuark() {
82 return fThreadQuark;
83 }
84
85 }
This page took 0.050122 seconds and 5 git commands to generate.