* This is the specification of CtfTmfTrace for use with LTTng 2.x kernel
* traces. It uses the CtfKernelStateInput to generate the state history.
*
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public class CtfKernelTrace extends CtfTmfTrace {
/*******************************************************************************
* Copyright (c) 2012 Ericsson
- *
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Alexandre Montplaisir - Initial API
******************************************************************************/
/**
* This is the basic interface for accessing state intervals. See
* StateInterval.java for a basic implementation.
- *
+ *
* A StateInterval is meant to be immutable. All implementing (non-abstract)
* classes should ideally be marked as 'final'.
- *
- * @author alexmont
- *
+ *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public interface ITmfStateInterval {
/**
* Retrieve the start time of the interval
- *
+ *
* @return the start time of the interval
*/
public long getStartTime();
/**
* Retrieve the end time of the interval
- *
+ *
* @return the end time of the interval
*/
public long getEndTime();
* In case the "real" end time of the interval is not exactly the same as
* the end time you want to show in views, you can implement this method to
* assign a different value that the viewer can use.
- *
+ *
* If not, you can simply have it return the same as getEndTime().
- *
+ *
* @return The end time that views should use
*/
public long getViewerEndTime();
/**
* Retrieve the quark of the attribute this state interval refers to
- *
+ *
* @return the quark of the attribute this state interval refers to
*/
public int getAttribute();
/**
* Retrieve the state value represented by this interval
- *
+ *
* @return the state value represented by this interval
*/
public ITmfStateValue getStateValue();
/**
* Test if this interval intersects another timestamp, inclusively.
- *
+ *
* @param timestamp
* The target timestamp
* @return True if the interval and timestamp intersect, false if they don't
* given time. It is the main object being returned from queries to the state
* system.
*
-
- *
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public final class TmfStateInterval implements ITmfStateInterval {
* Usually a state change input, also called "state provider" is the piece of
* the pipeline which converts trace events to state changes.
*
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public interface IStateChangeInput {
/**
* This is the external interface to build or modify an existing state history.
- *
+ *
* It extends IStateSystemEnquirer, so you can still use it for reading the
* history, but it also provides write-access to it with the quark-creating and
* state-change insertion methods.
- *
- * @author alexmont
- *
+ *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public interface IStateSystemBuilder extends IStateSystemQuerier {
/**
* Basic quark-retrieving method. Pass an attribute in parameter as an array
* of strings, the matching quark will be returned.
- *
+ *
* This version WILL create new attributes: if the attribute passed in
* parameter is new in the system, it will be added and its new quark will
* be returned.
- *
+ *
* @param attribute
* Attribute given as its full path in the Attribute Tree
* @return The quark of the attribute (which either existed or just got
* "Relative path" quark-getting method. Instead of specifying a full path,
* if you know the path is relative to another attribute for which you
* already have the quark, use this for better performance.
- *
+ *
* This is useful for cases where a lot of modifications or queries will
* originate from the same branch of the attribute tree : the common part of
* the path won't have to be re-hashed for every access.
- *
+ *
* This version WILL create new attributes: if the attribute passed in
* parameter is new in the system, it will be added and its new quark will
* be returned.
- *
+ *
* @param startingNodeQuark
* The quark of the attribute from which 'subPath' originates.
* @param subPath
/**
* Modify a current "ongoing" state (instead of inserting a state change,
* like modifyAttribute() and others).
- *
+ *
* This can be used to update the value of a previous state change, for
* example when we get information at the end of the state and not at the
* beginning. (return values of system calls, etc.)
- *
+ *
* Note that past states can only be modified while they are still in
* memory, so only the "current state" can be updated. Once they get
* committed to disk (by inserting a new state change) it becomes too late.
- *
+ *
* @param newValue
* The new value that will overwrite the "current" one.
* @param attributeQuark
/**
* Basic attribute modification method, we simply specify a new value, for a
* given attribute, effective at the given timestamp.
- *
+ *
* @param t
* Timestamp of the state change
* @param value
* Increment attribute method. Reads the current value of a given integer
* attribute (this value is right now in the Transient State), and increment
* it by 1. Useful for statistics.
- *
+ *
* @param t
* Timestamp of the state change
* @param attributeQuark
* Sub-attributes will be created, their base-name will be the position in
* the stack (1, 2, etc.) and their value will be the state value 'value'
* that was pushed to this position.
- *
+ *
* @param t
* Timestamp of the state change
* @param value
* stack-attribute. If this brings it back to depth = 0, the attribute is
* kept with depth = 0. If the value is already 0, or if the attribute
* doesn't exist, nothing is done.
- *
+ *
* @param t
* Timestamp of the state change
* @param attributeQuark
* Remove attribute method. Similar to the above modify- methods, with value
* = 0 / null, except we will also "nullify" all the sub-contents of the
* requested path (a bit like "rm -rf")
- *
+ *
* @param t
* Timestamp of the state change
* @param attributeQuark
* we are done reading an off-line trace. First we close the TransientState,
* commit it to the Provider, mark it as inactive, then we write the
* Attribute Tree somewhere so we can reopen it later.
- *
+ *
* @param endTime
* The requested End Time of the history, since it could be
* bigger than the timestamp of the last event or state change we
* This is the read-only interface to the generic state system. It contains all
* the read-only quark-getting methods, as well as the history-querying ones.
*
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public interface IStateSystemQuerier {
* This abstract manager class handles loading or creating state history files
* for use in TMF's generic state system.
*
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public abstract class StateSystemManager extends TmfComponent {
/**
* This is the interface for using state values and reading their contents.
*
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public interface ITmfStateValue {
* Copyright (c) 2012 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
*******************************************************************************/
package org.eclipse.linuxtools.tmf.core.statevalue;
/**
* A state value containing a simple integer.
- *
- * @author alexmont
*
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
final class IntegerStateValue extends TmfStateValue {
* Copyright (c) 2012 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
*******************************************************************************/
package org.eclipse.linuxtools.tmf.core.statevalue;
/**
* A state value that contains no particular value. It is sometimes needed over
* a "null" reference, since we avoid NPE's this way.
- *
+ *
* It can also be read either as a String ("nullValue") or an Integer (-1).
- *
- * @author alexmont
*
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
final class NullStateValue extends TmfStateValue {
* Copyright (c) 2012 Ericsson
* Copyright (c) 2010, 2011 École Polytechnique de Montréal
* Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
- *
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
*******************************************************************************/
package org.eclipse.linuxtools.tmf.core.statevalue;
/**
* A state value containing a variable-sized string
- *
- * @author alexmont
*
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
final class StringStateValue extends TmfStateValue {
*
* For now the two available types are either int or String.
*
- * @author alexmont
- *
+ * @version 1.0
+ * @author Alexandre Montplaisir
*/
public abstract class TmfStateValue implements ITmfStateValue {