add x86_64 support
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 14 Jul 2008 20:18:58 +0000 (20:18 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Mon, 14 Jul 2008 20:18:58 +0000 (20:18 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2951 04897980-b3bd-0310-b5e0-8ef037075253

markers-userspace/kernel-api.h
markers-userspace/patch-linker-script-i386.x.patch [new file with mode: 0644]
markers-userspace/testprog.c

index 4c0a13608e086dde7eb00e59dad98e6c26439baf..29192ea44dd1a9779c527f3525d2e9799efdc769 100644 (file)
@@ -37,8 +37,15 @@ extern "C" {
  */
 #define _imv_read(name)                (name##__imv)
 
+#ifdef __i386__
 #define __NR_marker             327
 #define __NR_trace              328
+#elif defined(__x86_64__)
+#define __NR_marker            288
+#define __NR_trace             289
+#else
+#error "Unsupported architecture for userspace markers"
+#endif
 
 #define sys_marker(...) syscall(__NR_marker, __VA_ARGS__)
 #define sys_trace(...) syscall(__NR_trace, __VA_ARGS__)
diff --git a/markers-userspace/patch-linker-script-i386.x.patch b/markers-userspace/patch-linker-script-i386.x.patch
new file mode 100644 (file)
index 0000000..f24725b
--- /dev/null
@@ -0,0 +1,5 @@
+136a137,140
+>     . = ALIGN(8);
+>     PROVIDE (__start___markers = .);
+>     *(__markers)
+>     PROVIDE (__stop___markers = .);
index 0dedac6aba65189345d324c51d3c6dfee1d63f29..d9fe8d2b0ecd4e33b6165861761a3d54a03ee291 100644 (file)
@@ -9,11 +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.024456 seconds and 4 git commands to generate.