analysis.io: Add I/O events and fields to the event layout
authorGeneviève Bastien <gbastien+lttng@versatic.net>
Mon, 21 Mar 2016 13:35:15 +0000 (09:35 -0400)
committerGenevieve Bastien <gbastien+lttng@versatic.net>
Fri, 1 Apr 2016 21:57:16 +0000 (17:57 -0400)
And update it for LTTng event layout

Change-Id: Idabcd30fb321e03ef29e65b936b2832f96bc42a5
Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net>
Reviewed-on: https://git.eclipse.org/r/69146
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hudson CI
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/LttngEventLayout.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/trace/layout/PerfEventLayout.java

index 73692aae520389c6e939052cb21e8bd3ecc579fd..91feb0fd6c55892c6bf25d137f6b145e603ad206 100644 (file)
@@ -547,4 +547,161 @@ public interface IKernelAnalysisEventLayout {
      */
     String fieldHRtimerNow();
 
+    /**
+     * The field containing the return value of a system call exit.
+     *
+     * @return The name of return field
+     * @since 2.0
+     */
+    default String fieldSyscallRet() {
+        return "ret"; //$NON-NLS-1$
+    }
+
+    // ------------------------------------------------------------------------
+    // I/O events and fields
+    // ------------------------------------------------------------------------
+
+    /**
+     * A request to a block IO has just been inserted in the waiting queue.
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default String eventBlockRqInsert() {
+        return "block_rq_insert"; //$NON-NLS-1$
+    }
+
+    /**
+     * A request to a block IO has just been issued and passed from the waiting
+     * queue to the driver queue. It is being served.
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default String eventBlockRqIssue() {
+        return "block_rq_issue"; //$NON-NLS-1$
+    }
+
+    /**
+     * A request to a block IO has just been completed.
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default String eventBlockRqComplete() {
+        return "block_rq_complete"; //$NON-NLS-1$
+    }
+
+    /**
+     * A BIO operation is being merged at the front of a waiting request
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default String eventBlockBioFrontmerge() {
+        return "block_bio_frontmerge"; //$NON-NLS-1$
+    }
+
+    /**
+     * A BIO operation is being merged at the back of a waiting request
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default String eventBlockBioBackmerge() {
+        return "block_bio_backmerge"; //$NON-NLS-1$
+    }
+
+    /**
+     * 2 requests previously inserted in the waiting queue are being merged
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default String eventBlockRqMerge() {
+        return "block_rq_merge"; //$NON-NLS-1$
+    }
+
+    /**
+     * Optional event used by some tracers to associate the name of the block
+     * device to a device ID
+     *
+     * @return The name of the event
+     * @since 2.0
+     */
+    default @Nullable String eventStatedumpBlockDevice() {
+        return null;
+    }
+
+    /**
+     * The field containing the device ID
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldBlockDeviceId() {
+        return "dev"; //$NON-NLS-1$
+    }
+
+    /**
+     * The field with the first sector of a block operation
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldBlockSector() {
+        return "sector"; //$NON-NLS-1$
+    }
+
+    /**
+     * The field with the number of sectors involved in a block operation
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldBlockNrSector() {
+        return "nr_sector"; //$NON-NLS-1$
+    }
+
+    /**
+     * The field containing the read/write flag of a block operation
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldBlockRwbs() {
+        return "rwbs"; //$NON-NLS-1$
+    }
+
+    /**
+     * The field with the first sector of a request in which another block
+     * operation is being merged
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldBlockRqSector() {
+        return "rq_sector"; //$NON-NLS-1$
+    }
+
+    /**
+     * The field with the sector of the request being merged in another one
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldBlockNextRqSector() {
+        return "nextrq_sector"; //$NON-NLS-1$
+    }
+
+    /**
+     * The field containing the name of the disk
+     *
+     * @return The name of the field
+     * @since 2.0
+     */
+    default String fieldDiskname() {
+        return "diskname"; //$NON-NLS-1$
+    }
+
 }
index af7b1796a124c72e3c11c5c905fb57a5784787c9..e79dd8f1998076efda73724682e34a0e6b10fc30 100644 (file)
@@ -61,6 +61,14 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String COMPAT_SYSCALL_ENTRY_PREFIX = "compat_sys_";
     private static final String SYSCALL_EXIT_PREFIX = "exit_syscall";
 
+    private static final String BLOCK_RQ_INSERT= "block_rq_insert";
+    private static final String BLOCK_RQ_ISSUE= "block_rq_issue";
+    private static final String ELV_MERGE_REQUESTS= "addons_elv_merge_requests";
+    private static final String BLOCK_RQ_COMPLETE= "block_rq_complete";
+    private static final String LTTNG_STATEDUMP_BLOCK_DEVICE= "lttng_statedump_block_device";
+    private static final String BLOCK_BIO_FRONTMERGE = "block_bio_frontmerge";
+    private static final String BLOCK_BIO_BACKMERGE = "block_bio_backmerge";
+
     /* Field names */
     private static final String IRQ = "irq";
     private static final String TID = "tid";
@@ -87,6 +95,14 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
     private static final String HRTIMER_SOFT_EXPIRES = "softexpires";
     private static final String KMEM_ALLOC = "mm_page_alloc";
     private static final String KMEM_FREE = "mm_page_free";
+    private static final String SYSCALL_RET = "ret";
+    private static final String RWBS="rwbs";
+    private static final String DISKNAME="diskname";
+    private static final String BLOCK_DEV="dev";
+    private static final String SECTOR="sector";
+    private static final String NR_SECTOR="nr_sector";
+    private static final String RQ_SECTOR= "rq_sector";
+    private static final String NEXTRQ_SECTOR= "nextrq_sector";
 
     /** All instances are the same. Only provide a static instance getter */
     protected LttngEventLayout() {
@@ -372,4 +388,83 @@ public class LttngEventLayout implements IKernelAnalysisEventLayout {
         return HRTIMER_NOW;
     }
 
+    @Override
+    public String fieldSyscallRet() {
+        return SYSCALL_RET;
+    }
+
+    // ------------------------------------------------------------------------
+    // I/O events and fields
+    // ------------------------------------------------------------------------
+
+    @Override
+    public String eventBlockRqInsert() {
+        return BLOCK_RQ_INSERT;
+    }
+
+    @Override
+    public String eventBlockRqIssue() {
+        return BLOCK_RQ_ISSUE;
+    }
+
+    @Override
+    public String eventBlockRqComplete() {
+        return BLOCK_RQ_COMPLETE;
+    }
+
+    @Override
+    public String eventBlockBioFrontmerge() {
+        return BLOCK_BIO_FRONTMERGE;
+    }
+
+    @Override
+    public String eventBlockBioBackmerge() {
+        return BLOCK_BIO_BACKMERGE;
+    }
+
+    @Override
+    public String eventBlockRqMerge() {
+        return ELV_MERGE_REQUESTS;
+    }
+
+    @Override
+    public @NonNull String eventStatedumpBlockDevice() {
+        return LTTNG_STATEDUMP_BLOCK_DEVICE;
+    }
+
+    @Override
+    public String fieldBlockDeviceId() {
+        return BLOCK_DEV;
+    }
+
+    @Override
+    public String fieldBlockSector() {
+        return SECTOR;
+    }
+
+    @Override
+    public String fieldBlockNrSector() {
+        return NR_SECTOR;
+    }
+
+    @Override
+    public String fieldBlockRwbs() {
+        return RWBS;
+    }
+
+    @Override
+    public String fieldBlockRqSector() {
+        return RQ_SECTOR;
+    }
+
+    @Override
+    public String fieldBlockNextRqSector() {
+        return NEXTRQ_SECTOR;
+    }
+
+    @Override
+    public String fieldDiskname() {
+        return DISKNAME;
+    }
+
 }
index 2a0c93c3a4acf94640e0ff3107c6543f7cd31e57..6c2f69036d8bd1a80461d5aacea413639d3ccae8 100644 (file)
@@ -290,4 +290,34 @@ public class PerfEventLayout implements IKernelAnalysisEventLayout {
     public String fieldHRtimerNow() {
         return "now"; //$NON-NLS-1$
     }
+
+    // ------------------------------------------------------------------------
+    // I/O events and fields
+    // ------------------------------------------------------------------------
+
+    @Override
+    public String eventBlockRqInsert() {
+        return "block:block_rq_insert"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String eventBlockRqIssue() {
+        return "block:block_rq_issue"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String eventBlockRqComplete() {
+        return "block:block_rq_complete"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String eventBlockBioFrontmerge() {
+        return "block:block_bio_frontmerge"; //$NON-NLS-1$
+    }
+
+    @Override
+    public String eventBlockBioBackmerge() {
+        return "block:block_bio_backmerge"; //$NON-NLS-1$
+    }
+
 }
This page took 0.029604 seconds and 5 git commands to generate.