summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGlenn Miles <milesg@us.ibm.com>2015-03-10 17:42:41 -0500
committerGlenn R. Miles <milesg@us.ibm.com>2015-03-18 12:48:41 -0500
commit940a702e3db3e03d782963fb46918dc8e22a17a6 (patch)
tree4dba9b862aeadbc7e38c68d5e641163d1334e62a /tools
parent67f172f563d6f229ba9d30eb97a4cc0d64a7af17 (diff)
downloadtalos-sbe-940a702e3db3e03d782963fb46918dc8e22a17a6.tar.gz
talos-sbe-940a702e3db3e03d782963fb46918dc8e22a17a6.zip
Support for using an external timebase register
Change-Id: I2c40fdf88f51315b19e8d639f874fb79717419ce Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/16369 Reviewed-by: Glenn R. Miles <milesg@us.ibm.com> Tested-by: Glenn R. Miles <milesg@us.ibm.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/ppetracepp/ppe2fspbin18634 -> 18842 bytes
-rwxr-xr-xtools/ppetracepp/ppe2fsp.c12
-rwxr-xr-xtools/ppetracepp/ppetraceppbin230943 -> 230947 bytes
3 files changed, 11 insertions, 1 deletions
diff --git a/tools/ppetracepp/ppe2fsp b/tools/ppetracepp/ppe2fsp
index 1f7b56f2..4554ffff 100755
--- a/tools/ppetracepp/ppe2fsp
+++ b/tools/ppetracepp/ppe2fsp
Binary files differ
diff --git a/tools/ppetracepp/ppe2fsp.c b/tools/ppetracepp/ppe2fsp.c
index 419a8d49..7cbd65a4 100755
--- a/tools/ppetracepp/ppe2fsp.c
+++ b/tools/ppetracepp/ppe2fsp.c
@@ -324,6 +324,7 @@ int ppe2fsp(void* in, unsigned long in_size, void* out, unsigned long* io_size)
PkTraceGeneric* pte_footer;
largest_fsp_entry_t fte;
LargestPpeEntry pte;
+ uint64_t time_adj64;
do
{
@@ -350,6 +351,15 @@ int ppe2fsp(void* in, unsigned long in_size, void* out, unsigned long* io_size)
fsp_bytes_left = *io_size - sizeof(trace_buf_head_t);
ppe_bytes_left = ntohs(ptb->size);
ptb_offset = ntohl(ptb->state.offset);
+ if(htonl(1) == 1)
+ {
+ time_adj64 = ptb->time_adj64;
+ }
+ else
+ {
+ time_adj64 = ntohl((uint32_t)(ptb->time_adj64 >> 32));
+ time_adj64 |= ((uint64_t)(ntohl((uint32_t)(ptb->time_adj64 & 0x00000000ffffffff)))) << 32;
+ }
//make sure the ppe buffer size is a power of two
if((ppe_bytes_left - 1) & ppe_bytes_left)
@@ -451,7 +461,7 @@ int ppe2fsp(void* in, unsigned long in_size, void* out, unsigned long* io_size)
prev_time32 = new_time32;
//convert the ppe trace entry to an fsp trace entry
- fte_size = pte2fte(ptb, &pte, pte_size, &fte, ppe_time64);
+ fte_size = pte2fte(ptb, &pte, pte_size, &fte, ppe_time64 + time_adj64);
//fit as much of the entry into the fsp trace buffer as possible
fsp_put_entry(ftb, &fte, fte_size, fsp_bytes_left);
diff --git a/tools/ppetracepp/ppetracepp b/tools/ppetracepp/ppetracepp
index 52269147..acf90492 100755
--- a/tools/ppetracepp/ppetracepp
+++ b/tools/ppetracepp/ppetracepp
Binary files differ
OpenPOWER on IntegriCloud