update
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 15 Feb 2008 22:41:22 +0000 (22:41 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 15 Feb 2008 22:41:22 +0000 (22:41 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2817 04897980-b3bd-0310-b5e0-8ef037075253

markers-userspace/kernel-api.h
markers-userspace/marker-lib.c
markers-userspace/testprog.c

index 6172ad5240c1c07ae6a4b7c8fb92b568f121e1f0..f972fe18a6123c99afd3b5458a5c2eb07fa3c48d 100644 (file)
@@ -38,6 +38,7 @@ extern "C" {
 #define _imv_read(name)                (name##__imv)
 
 #define __NR_marker             328
+#define __NR_trace              329
 
 #define sys_marker(...) syscall(__NR_marker, __VA_ARGS__)
 
index c13c9eec194fd7154151f4736cf75115422fc63a..b2165b8b7ac542a86f4da1399a1be0c0a6bda1b1 100644 (file)
@@ -39,9 +39,13 @@ __attribute__ ((visibility ("protected")))
 void marker_probe_cb(const struct marker *mdata, void *call_private,
        const char *fmt, ...)
 {
-       static unsigned int count = 0;
+       char buf[PAGE_SIZE];
+       va_list ap;
 
-       printf("Test probe function %u\n", count++);
+       va_start(ap, fmt);
+       vsnprintf(buf, PAGE_SIZE-1, fmt, ap);
+       sys_trace(0, 0, buf);
+       va_end(ap);
 }
 
 //FIXME : imv_read won't work with optimized immediate values.
index 5c3010a88c849fe1abc763447d5270eaa13943b3..0dedac6aba65189345d324c51d3c6dfee1d63f29 100644 (file)
@@ -9,10 +9,11 @@ int main(int argc, char **argv)
        void *ptr;
        unsigned long val;
 
-       while (1) {
+       //while (1) {
                trace_mark(test_marker, "ptr %p val %lu", ptr, val);
                testfct();
                sleep(2);
-       }
+       //}
+       execl("/bin/ls", NULL);
        return 0;
 }
This page took 0.024321 seconds and 4 git commands to generate.