(no commit message)
[deliverable/tracecompass.git] / org.eclipse.linuxtools.lttng.ui / src / org / eclipse / linuxtools / lttng / ui / views / resources / evProcessor / ResourcesAfterUpdateHandlers.java
1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.linuxtools.lttng.ui.views.resources.evProcessor;
13
14 import org.eclipse.linuxtools.lttng.event.LttngEvent;
15 import org.eclipse.linuxtools.lttng.state.evProcessor.ILttngEventProcessor;
16 import org.eclipse.linuxtools.lttng.state.model.LttngTraceState;
17
18 /**
19 * Creates instances of specific after state update handlers, per corresponding
20 * event.
21 *
22 * @author alvaro
23 *
24 */
25 public class ResourcesAfterUpdateHandlers {
26
27 /**
28 * <p>
29 * Handles: LTT_EVENT_SCHED_SCHEDULE
30 * </p>
31 * Replace C function named "after_schedchange_hook" in eventhooks.c
32 * <p>
33 * Fields: LTT_FIELD_PREV_PID, LTT_FIELD_NEXT_PID, LTT_FIELD_PREV_STATE
34 * </p>
35 *
36 * @return
37 */
38 final ILttngEventProcessor getAfterSchedChangeHandler() {
39 AbsResourcesTRangeUpdate handler = new AbsResourcesTRangeUpdate() {
40
41 public boolean process(LttngEvent trcEvent, LttngTraceState traceSt) {
42
43 // TODO: After sched scheduler handler should implement an
44 // update to the current resource data, similar to
45 // current_hash_data in C
46 // We don't keep track of current hashed resource, we look in
47 // the hash table every time. keeping track of current hash may
48 // improve performance, although needs to be bench marked to
49 // verify
50 // if there's is a real gain.
51
52 // process_list->current_hash_data[trace_num][process_in->cpu] =
53 // hashed_process_data_in;
54
55 return false;
56 }
57 };
58
59 return handler;
60 }
61
62 /**
63 * Drawing stuff ?
64 */
65 // int after_request(void *hook_data, void *call_data)
66 // int after_chunk(void *hook_data, void *call_data)
67 // int before_statedump_end(void *hook_data, void *call_data)
68 }
This page took 0.031629 seconds and 5 git commands to generate.