1 /*******************************************************************************
2 * Copyright (c) 2009 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 * Yann N. Dauphin (dhaemon@gmail.com) - Implementation for stats
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.statistics
.evProcessor
;
14 import org
.eclipse
.linuxtools
.lttng
.state
.StateStrings
.Events
;
15 import org
.eclipse
.linuxtools
.lttng
.state
.evProcessor
.IEventProcessing
;
18 * Process the system call entry event
23 class StatsTimeCountHandlers
{
26 * Method to handle the event: LTT_EVENT_SYSCALL_ENTRY
30 final IEventProcessing
getSyscallEntryBeforeHandler() {
31 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_SYSCALL_ENTRY
);
36 * Method to handle the event: LTT_EVENT_SYSCALL_EXIT
40 final IEventProcessing
getsySyscallExitBeforeHandler() {
41 AbstractStatsEventHandler handler
= new StatsModeEndHandler(Events
.LTT_EVENT_SYSCALL_EXIT
);
46 * Method to handle the event: LTT_EVENT_TRAP_ENTRY
50 final IEventProcessing
getTrapEntryBeforeHandler() {
51 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_TRAP_ENTRY
);
56 * Method to handle the event: LTT_EVENT_TRAP_EXIT
60 final IEventProcessing
getTrapExitBeforeHandler() {
61 AbstractStatsEventHandler handler
= new StatsModeEndHandler(Events
.LTT_EVENT_TRAP_EXIT
);
66 * Method to handle the event: LTT_EVENT_IRQ_ENTRY
70 final IEventProcessing
getIrqEntryBeforeHandler() {
71 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_IRQ_ENTRY
);
76 * Method to handle the event: LTT_EVENT_IRQ_EXIT
80 final IEventProcessing
getIrqExitBeforeHandler() {
81 AbstractStatsEventHandler handler
= new StatsModeEndHandler(Events
.LTT_EVENT_IRQ_EXIT
);
86 * Method to handle the event: LTT_EVENT_SOFT_IRQ_ENTRY
90 final IEventProcessing
getSoftIrqEntryBeforeHandler() {
91 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_SOFT_IRQ_ENTRY
);
96 * Method to handle the event: LTT_EVENT_SOFT_IRQ_EXIT
100 final IEventProcessing
getSoftIrqExitBeforeHandler() {
101 AbstractStatsEventHandler handler
= new StatsModeEndHandler(Events
.LTT_EVENT_SOFT_IRQ_EXIT
);
107 * Handles event: LTT_EVENT_FUNCTION_ENTRY
110 * FIELDS: LTT_FIELD_THIS_FN, LTT_FIELD_CALL_SITE
115 final IEventProcessing
getFunctionEntryBeforeHandler() {
116 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_FUNCTION_ENTRY
);
124 final IEventProcessing
getFunctionExitBeforeHandler() {
125 AbstractStatsEventHandler handler
= new StatsModeEndHandler(Events
.LTT_EVENT_FUNCTION_EXIT
);
131 * Handles: LTT_EVENT_SCHED_SCHEDULE
134 * Fields: LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE
139 final IEventProcessing
getSchedChangeBeforeHandler() {
140 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_SCHED_SCHEDULE
);
146 * Handles: LTT_EVENT_SCHED_SCHEDULE
149 * Fields: LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE
154 final IEventProcessing
getSchedChangeAfterHandler() {
155 AbstractStatsEventHandler handler
= new StatsModeChangeHandler(Events
.LTT_EVENT_SCHED_SCHEDULE
);