X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=hello%2Fhello.c;h=058f7fae10abaa2c7c5a957c1bdc80fe40f8f8f1;hb=HEAD;hp=51979861e28b0e37003c1ec7fb6600887701bb7a;hpb=b6bf28ecd4c07e7865d340f1600a35d6edc05ec8;p=lttng-ust.git diff --git a/hello/hello.c b/hello/hello.c deleted file mode 100644 index 51979861..00000000 --- a/hello/hello.c +++ /dev/null @@ -1,44 +0,0 @@ -#include -#include -#include - -#include "../libmarkers/marker.h" - -void probe(const struct marker *mdata, - void *probe_private, void *call_private, - const char *fmt, va_list *args) -{ - printf("In probe\n"); -} - -void try_map() -{ - char *m; - - /* maybe add MAP_LOCKED */ - m = mmap(NULL, 4096, PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS | MAP_POPULATE , -1, 0); - if(m == (char*)-1) { - perror("mmap"); - return; - } - - printf("The mapping is at %p.\n", m); - strcpy(m, "Hello, Mapping!"); -} - -int main() -{ - //ltt_trace_create(); - - try_map(); - - printf("Hello, World!\n"); - - marker_probe_register("abc", "testmark", "", probe, NULL); - - trace_mark(abc, testmark, "", MARK_NOARGS); - - scanf("%*s"); - - return 0; -}