summaryrefslogtreecommitdiffstats
path: root/src/usr/example/example.C
diff options
context:
space:
mode:
authorAndrew Geissler <andrewg@us.ibm.com>2011-05-09 14:51:09 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2011-05-16 16:49:41 -0500
commit0ec3f482259bdcc1867fb884eb89a4c0c5fc026d (patch)
tree23ae2abc22750e836c0c7179958437837f4d8fef /src/usr/example/example.C
parent038fb97fb799935574a62821fa3eab7ef8ccc14c (diff)
downloadtalos-hostboot-0ec3f482259bdcc1867fb884eb89a4c0c5fc026d.tar.gz
talos-hostboot-0ec3f482259bdcc1867fb884eb89a4c0c5fc026d.zip
Initial trace support for host boot
Change-Id: Ib2450ae3d32549673ca8e1c814a7a11b5f1a0c09 Reviewed-on: http://gfwr801.rchland.ibm.com:8080/gerrit/69 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/example/example.C')
-rw-r--r--src/usr/example/example.C36
1 files changed, 31 insertions, 5 deletions
diff --git a/src/usr/example/example.C b/src/usr/example/example.C
index 6aa188f3c..193bbb9d3 100644
--- a/src/usr/example/example.C
+++ b/src/usr/example/example.C
@@ -1,18 +1,44 @@
+/*
+ * Change Log ******************************************************************
+ * Flag Defect/Feature User Date Description
+ * ------ -------------- ---------- ----------- ----------------------------
+ * $ag000 andrewg 04/01/2011 Updated
+ *
+*/
+
#include <kernel/console.H>
#include <sys/mutex.h>
#include <sys/vfs.h>
#include <sys/task.h>
-#include <tracinterface.H>
+#include <trace/interface.H>
//static mutex_t value = mutex_create();
-
-trace_desc_t g_exampleTrace;
-TRAC_INIT(&g_exampleTrace, "EXAMPLE", 4096);
+trace_desc_t *g_trac_test = NULL;
+TRAC_INIT(&g_trac_test, "EXAMPLE", 4096);
extern "C"
void _start(void*)
{
printk("Executing example module.\n");
- TRACFCOMP(g_exampleTrace, "Executing example module: %d", task_gettid());
+
+ // Component trace tests
+ //for(uint32_t i=0;i<100;i++)
+ //{
+ uint32_t i=0;
+ TRACFCOMP(g_trac_test, "Executing example module: %d", task_gettid());
+ TRACFCOMP(g_trac_test, "Test 2: %d %u %c", i,i+1,'a');
+ TRACFCOMP(g_trac_test, "Test 3: %d %u 0x%X", i+2,i+3,
+ 0x123456789ABCDEF0);
+ //}
+
+ // Pointer trace
+ //TRACFCOMP(g_trac_test, "Pointer Test: %llp",g_trac_test);
+
+ // Binary Trace
+ TRACFBIN(g_trac_test,"Binary dump of trace descriptor",
+ g_trac_test,sizeof(trace_desc_t));
+
+
+
task_end();
}
OpenPOWER on IntegriCloud