btrace: support Intel(R) Processor Trace
[deliverable/binutils-gdb.git] / gdb / common / btrace-common.h
index ba99a067e2c0b78b9b83ce9481971e13fa48265a..ebae17eee45f248226f40c75ebcef362bef86dd9 100644 (file)
@@ -58,7 +58,10 @@ enum btrace_format
 
   /* Branch trace is in Branch Trace Store (BTS) format.
      Actually, the format is a sequence of blocks derived from BTS.  */
-  BTRACE_FORMAT_BTS
+  BTRACE_FORMAT_BTS,
+
+  /* Branch trace is in Intel(R) Processor Trace format.  */
+  BTRACE_FORMAT_PT
 };
 
 /* An enumeration of cpu vendors.  */
@@ -97,6 +100,14 @@ struct btrace_config_bts
   unsigned int size;
 };
 
+/* An Intel(R) Processor Trace configuration.  */
+
+struct btrace_config_pt
+{
+  /* The size of the branch trace buffer in bytes.  */
+  unsigned int size;
+};
+
 /* A branch tracing configuration.
 
    This describes the requested configuration as well as the actually
@@ -111,6 +122,9 @@ struct btrace_config
 
   /* The BTS format configuration.  */
   struct btrace_config_bts bts;
+
+  /* The Intel(R) Processor Trace format configuration.  */
+  struct btrace_config_pt pt;
 };
 
 /* Branch trace in BTS format.  */
@@ -121,6 +135,26 @@ struct btrace_data_bts
   VEC (btrace_block_s) *blocks;
 };
 
+/* Configuration information to go with the trace data.  */
+struct btrace_data_pt_config
+{
+  /* The processor on which the trace has been collected.  */
+  struct btrace_cpu cpu;
+};
+
+/* Branch trace in Intel(R) Processor Trace format.  */
+struct btrace_data_pt
+{
+  /* Some configuration information to go with the data.  */
+  struct btrace_data_pt_config config;
+
+  /* The trace data.  */
+  gdb_byte *data;
+
+  /* The size of DATA in bytes.  */
+  unsigned long size;
+};
+
 /* The branch trace data.  */
 struct btrace_data
 {
@@ -130,6 +164,9 @@ struct btrace_data
   {
     /* Format == BTRACE_FORMAT_BTS.  */
     struct btrace_data_bts bts;
+
+    /* Format == BTRACE_FORMAT_PT.  */
+    struct btrace_data_pt pt;
   } variant;
 };
 
This page took 0.029098 seconds and 4 git commands to generate.