1 /*******************************************************************************
2 * Copyright (c) 2013, 2014 Ericsson
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
10 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.tracecompass
.tmf
.ui
.views
.callstack
;
15 import java
.util
.regex
.Pattern
;
17 import org
.eclipse
.jdt
.annotation
.NonNull
;
18 import org
.eclipse
.tracecompass
.statesystem
.core
.ITmfStateSystem
;
19 import org
.eclipse
.tracecompass
.tmf
.core
.trace
.ITmfTrace
;
20 import org
.eclipse
.tracecompass
.tmf
.ui
.widgets
.timegraph
.model
.TimeGraphEntry
;
23 * An entry, or row, in the Call Stack view
25 * @author Patrick Tasse
27 public class CallStackEntry
extends TimeGraphEntry
{
29 private final int fQuark
;
30 private final int fStackLevel
;
31 private final int fProcessId
;
32 private final ITmfTrace fTrace
;
33 private String fFunctionName
;
34 private long fFunctionEntryTime
;
35 private long fFunctionExitTime
;
36 private @NonNull ITmfStateSystem fSS
;
39 * Standard constructor
42 * The parent thread name
44 * The call stack quark
47 * @param processId The ID of the process this entry belongs to
49 * The trace that this view is talking about
51 * The call stack state system
54 public CallStackEntry(String name
, int quark
, int stackLevel
, int processId
,
55 ITmfTrace trace
, @NonNull ITmfStateSystem ss
) {
58 fStackLevel
= stackLevel
;
59 fProcessId
= processId
;
61 fFunctionName
= ""; //$NON-NLS-1$
66 * Get the function name of the call stack entry
67 * @return the function name
69 public String
getFunctionName() {
74 * Set the function name of the call stack entry
75 * @param functionName the function name
77 public void setFunctionName(String functionName
) {
78 fFunctionName
= functionName
;
82 * Set the selected function entry time
85 * the function entry time
87 public void setFunctionEntryTime(long entryTime
) {
88 fFunctionEntryTime
= entryTime
;
92 * Get the selected function entry time
94 * @return the function entry time
96 public long getFunctionEntryTime() {
97 return fFunctionEntryTime
;
101 * Set the selected function exit time
104 * the function exit time
106 public void setFunctionExitTime(long exitTime
) {
107 fFunctionExitTime
= exitTime
;
111 * Get the selected function exit time
113 * @return the function exit time
115 public long getFunctionExitTime() {
116 return fFunctionExitTime
;
120 * Retrieve the attribute quark that's represented by this entry.
122 * @return The integer quark
124 public int getQuark() {
129 * Retrieve the stack level associated with this entry.
131 * @return The stack level or 0
133 public int getStackLevel() {
138 * Retrieve the ID of the process this entry belongs to.
140 * @return The ID of the process
143 public int getProcessId() {
148 * Retrieve the trace that is associated to this view.
152 public ITmfTrace
getTrace() {
157 * Retrieve the call stack state system associated with this entry.
159 * @return The call stack state system
161 public @NonNull ITmfStateSystem
getStateSystem() {
166 public boolean matches(@NonNull Pattern pattern
) {
167 return pattern
.matcher(fFunctionName
).find();
This page took 0.034302 seconds and 5 git commands to generate.