lttng: Add the dependency graph model and handlers for an LTTng kernel
[deliverable/tracecompass.git] / lttng / org.eclipse.tracecompass.lttng2.kernel.core / src / org / eclipse / tracecompass / internal / lttng2 / kernel / core / analysis / graph / model / LttngInterruptContext.java
1 /*******************************************************************************
2 * Copyright (c) 2015 É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
10 package org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.graph.model;
11
12 import org.eclipse.tracecompass.internal.lttng2.kernel.core.analysis.graph.building.LttngKernelExecGraphProvider.Context;
13 import org.eclipse.tracecompass.tmf.core.event.ITmfEvent;
14 import org.eclipse.tracecompass.tmf.core.event.TmfEvent;
15 import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimestamp;
16 import org.eclipse.tracecompass.tmf.core.trace.ITmfContext;
17
18 /**
19 * A class representing an interrupt context in the kernel. It associates the
20 * reason of the context with an event.
21 *
22 * @author Francis Giraldeau
23 * @author Geneviève Bastien
24 */
25 public class LttngInterruptContext {
26
27 /**
28 * The default context when none is defined
29 */
30 public static final LttngInterruptContext DEFAULT_CONTEXT = new LttngInterruptContext(new TmfEvent(null, ITmfContext.UNKNOWN_RANK, TmfTimestamp.BIG_BANG, null, null), Context.NONE);
31
32 private final ITmfEvent fEvent;
33 private final Context fContext;
34
35 /**
36 * Constructor
37 *
38 * @param event
39 * The event representing the start of this interrupt context
40 * @param ctx
41 * The context type
42 */
43 public LttngInterruptContext(ITmfEvent event, Context ctx) {
44 fEvent = event;
45 fContext = ctx;
46 }
47
48 /**
49 * The event associated with this interrupt context
50 *
51 * @return The event marking the entry in this interrupt context
52 */
53 public ITmfEvent getEvent() {
54 return fEvent;
55 }
56
57 /**
58 * Get the type of interrupt context this context represents
59 *
60 * @return The type of interrupt context
61 */
62 public Context getContext() {
63 return fContext;
64 }
65
66 }
This page took 0.045574 seconds and 5 git commands to generate.