lttng: update and add HR timer related events and fields
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Tue, 27 Oct 2015 11:40:22 +0000 (07:40 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Mon, 2 Nov 2015 20:26:28 +0000 (15:26 -0500)
Change-Id: I87b3e1ac4a79059a2c70b1b3ef7e07be6baa4f10
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/59011
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/DefaultEventLayout.java
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/trace/IKernelAnalysisEventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/Lttng27EventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/LttngEventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/PerfEventLayout.java

index 7b0f09a546f5abc133e0058b2239e5c72a164815..dc500a9c1177541f8d4ab74b0be4aa837b2f0985 100644 (file)
@@ -38,6 +38,8 @@ public class DefaultEventLayout implements IKernelAnalysisEventLayout{
     private static final String SOFTIRQ_ENTRY = "softirq_entry"; //$NON-NLS-1$
     private static final String SOFTIRQ_EXIT = "softirq_exit"; //$NON-NLS-1$
     private static final String SOFTIRQ_RAISE = "softirq_raise"; //$NON-NLS-1$
+    private static final String HRTIMER_START = "hrtimer_start"; //$NON-NLS-1$
+    private static final String HRTIMER_CANCEL = "hrtimer_cancel"; //$NON-NLS-1$
     private static final String HRTIMER_EXPIRE_ENTRY = "hrtimer_expire_entry"; //$NON-NLS-1$
     private static final String HRTIMER_EXPIRE_EXIT = "hrtimer_expire_exit"; //$NON-NLS-1$
     private static final String SCHED_SWITCH = "sched_switch"; //$NON-NLS-1$
@@ -78,6 +80,11 @@ public class DefaultEventLayout implements IKernelAnalysisEventLayout{
     private static final String STATUS = "status"; //$NON-NLS-1$
     private static final String PREV_COMM = "prev_comm"; //$NON-NLS-1$
     private static final String FILENAME = "filename"; //$NON-NLS-1$
+    private static final String HRTIMER = "hrtimer"; //$NON-NLS-1$
+    private static final String FUNCTION = "function"; //$NON-NLS-1$
+    private static final String EXPIRES = "expires"; //$NON-NLS-1$
+    private static final String NOW = "now"; //$NON-NLS-1$
+    private static final String SOFT_EXPIRES = "softexpires"; //$NON-NLS-1$
 
     /** All instances are the same. Only provide a static instance getter */
     private DefaultEventLayout() {
@@ -293,6 +300,18 @@ public class DefaultEventLayout implements IKernelAnalysisEventLayout{
         return SCHED_WAKEUP_NEW;
     }
 
+    /** @since 2.0 */
+    @Override
+    public String eventHRTimerStart() {
+        return HRTIMER_START;
+    }
+
+    /** @since 2.0 */
+    @Override
+    public String eventHRTimerCancel() {
+        return HRTIMER_CANCEL;
+    }
+
     /** @since 2.0 */
     @Override
     public String eventHRTimerExpireEntry() {
@@ -315,4 +334,34 @@ public class DefaultEventLayout implements IKernelAnalysisEventLayout{
         return SCHED_TTWU;
     }
 
+    /** @since 2.0 */
+    @Override
+    public String fieldHRtimer() {
+        return HRTIMER;
+    }
+
+    /** @since 2.0 */
+    @Override
+    public String fieldHRtimerFunction() {
+        return FUNCTION;
+    }
+
+    /** @since 2.0 */
+    @Override
+    public String fieldHRtimerExpires() {
+        return EXPIRES;
+    }
+
+    /** @since 2.0 */
+    @Override
+    public String fieldHRtimerSoftexpires() {
+        return SOFT_EXPIRES;
+    }
+
+    /** @since 2.0 */
+    @Override
+    public String fieldHRtimerNow() {
+        return NOW;
+    }
+
 }
index fbfeb1de2591571219d76a862c10c90e2e09d9f5..0d7e59b854c58245a16c57807d3b6ccaeee9df8a 100644 (file)
@@ -216,6 +216,39 @@ public interface IKernelAnalysisEventLayout {
      */
     String eventSchedProcessWakeupNew();
 
+
+    /**
+     * Starting the high resolution timer
+     * <p>
+     * In Linux, High resolution timers are used in the following:
+     * <ul>
+     * <li>nanosleep</li>
+     * <li>itimers</li>
+     * <li>posix timers</li>
+     * </ul>
+     *
+     * @return the event name
+     *
+     * @since 2.0
+     */
+    String eventHRTimerStart();
+
+    /**
+     * Canceling the high resolution timer
+     * <p>
+     * In Linux, High resolution timers are used in the following:
+     * <ul>
+     * <li>nanosleep</li>
+     * <li>itimers</li>
+     * <li>posix timers</li>
+     * </ul>
+     *
+     * @return the event name
+     *
+     * @since 2.0
+     */
+    String eventHRTimerCancel();
+
     /**
      * Entering the high resolution timer expired handler.
      * <p>
@@ -440,4 +473,48 @@ public interface IKernelAnalysisEventLayout {
      * @since 1.0
      */
     String fieldNextPrio();
+
+    /**
+     * The field with the hrtimer. The hrtimer holds the timer instance.
+     *
+     * @return the name of the hrTimer field
+     * @since 2.0
+     */
+    String fieldHRtimer();
+
+    /**
+     * The field with the expires value. The expires field holds the expiry time.
+     * of the hrtimer.
+     *
+     * @return the name of the expires field
+     * @since 2.0
+     */
+    String fieldHRtimerExpires();
+
+    /**
+     * Gets the field name with the softexpires value. The softexpire value is the
+     * absolute earliest expiry time of the hrtimer.
+     *
+     * @return the name of the softexpires field
+     * @since 2.0
+     */
+    String fieldHRtimerSoftexpires();
+
+    /**
+     * The field of the function address value. The function field holds timer
+     * expiry callback function.
+     *
+     * @return the name of the function field
+     * @since 2.0
+     */
+    String fieldHRtimerFunction();
+
+    /**
+     * The field of the now value. The now field holds the current time.
+     *
+     * @return the name of the now field (hrtimer)
+     * @since 2.0
+     */
+    String fieldHRtimerNow();
+
 }
index cb86444be50090d1cd47e258cab838abae23a50b..109d12bb5f6bd78668b006c2dcf2782962a5276a 100644 (file)
@@ -29,7 +29,31 @@ public class Lttng27EventLayout extends Lttng26EventLayout {
     public static final Lttng27EventLayout INSTANCE = new Lttng27EventLayout();
 
     // ------------------------------------------------------------------------
-    // New definitions in LTTng 2.7
+    // New event definition in LTTng 2.7
+    // ------------------------------------------------------------------------
+
+    @Override
+    public String eventHRTimerStart() {
+        return "timer_hrtimer_start";
+    }
+
+    @Override
+    public String eventHRTimerCancel() {
+        return "timer_hrtimer_cancel";
+    }
+
+    @Override
+    public String eventHRTimerExpireEntry() {
+        return "timer_hrtimer_expire_entry";
+    }
+
+    @Override
+    public String eventHRTimerExpireExit() {
+        return "timer_hrtimer_expire_exit";
+    }
+
+    // ------------------------------------------------------------------------
+    // New field definitions in LTTng 2.7
     // ------------------------------------------------------------------------
 
     public String fieldParentNSInum() {
index ec4897f37912a1e7235606b46cc22389f7845a9e..d0454610b17ba4398d091b1a2b6c3b2ddbd1534f 100644 (file)
@@ -40,6 +40,8 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String SOFTIRQ_ENTRY = "softirq_entry";
     private static final String SOFTIRQ_EXIT = "softirq_exit";
     private static final String SOFTIRQ_RAISE = "softirq_raise";
+    private static final String HRTIMER_START = "hrtimer_start";
+    private static final String HRTIMER_CANCEL = "hrtimer_cancel";
     private static final String HRTIMER_EXPIRE_ENTRY = "hrtimer_expire_entry";
     private static final String HRTIMER_EXPIRE_EXIT = "hrtimer_expire_exit";
     private static final String SCHED_SWITCH = "sched_switch";
@@ -80,6 +82,11 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String STATUS = "status";
     private static final String PREV_COMM = "prev_comm";
     private static final String FILENAME = "filename";
+    private static final String HRTIMER = "hrtimer";
+    private static final String HRTIMER_FUNCTION = "function";
+    private static final String HRTIMER_EXPIRES = "expires";
+    private static final String HRTIMER_NOW = "now";
+    private static final String HRTIMER_SOFT_EXPIRES = "softexpires";
 
     /** All instances are the same. Only provide a static instance getter */
     protected LttngEventLayout() {
@@ -287,6 +294,16 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return SCHED_WAKEUP_NEW;
     }
 
+    @Override
+    public String eventHRTimerStart() {
+        return HRTIMER_START;
+    }
+
+    @Override
+    public String eventHRTimerCancel() {
+        return HRTIMER_CANCEL;
+    }
+
     @Override
     public String eventHRTimerExpireEntry() {
         return HRTIMER_EXPIRE_ENTRY;
@@ -306,4 +323,28 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     public String eventSchedProcessTTWU() {
         return SCHED_TTWU;
     }
+
+    @Override
+    public String fieldHRtimer() {
+        return HRTIMER;
+    }
+    @Override
+    public String fieldHRtimerFunction() {
+        return HRTIMER_FUNCTION;
+    }
+
+    @Override
+    public String fieldHRtimerExpires() {
+        return HRTIMER_EXPIRES;
+    }
+
+    @Override
+    public String fieldHRtimerSoftexpires() {
+        return HRTIMER_SOFT_EXPIRES;
+    }
+    @Override
+    public String fieldHRtimerNow() {
+        return HRTIMER_NOW;
+    }
+
 }
index edfac24b3780080ddb76dc1342b650efe078abab..ad164dc28d3726726fda45ebf4c31c6185402f68 100644 (file)
@@ -139,6 +139,16 @@ public class PerfEventLayout implements IKernelAnalysisEventLayout {
         return "sched:process_wakeup_new";  //$NON-NLS-1$
     }
 
+    @Override
+    public String eventHRTimerStart() {
+        return "timer:hrtimer_start";  //$NON-NLS-1$
+    }
+
+    @Override
+    public String eventHRTimerCancel() {
+        return "timer:hrtimer_cancel"; //$NON-NLS-1$
+    }
+
     @Override
     public String eventHRTimerExpireEntry() {
         return "timer:hrtimer_expire_entry"; //$NON-NLS-1$
@@ -243,4 +253,29 @@ public class PerfEventLayout implements IKernelAnalysisEventLayout {
         return "filename"; //$NON-NLS-1$
     }
 
+    @Override
+    public String fieldHRtimer() {
+        return "hrtimer"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String fieldHRtimerFunction() {
+        return "function"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String fieldHRtimerExpires() {
+        return "expires"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String fieldHRtimerSoftexpires() {
+        return "softexpires"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String fieldHRtimerNow() {
+        return "now"; //$NON-NLS-1$
+    }
+
 }
This page took 0.030317 seconds and 5 git commands to generate.