diff options
author | William Cohen <wcohen@redhat.com> | 2010-01-13 13:54:26 -0500 |
---|---|---|
committer | William Cohen <wcohen@redhat.com> | 2010-01-13 13:54:26 -0500 |
commit | cc52276b5ecd4501271d3846ad3519c7db03b54f (patch) | |
tree | d8a27ff500f6ed486e11f0e647438449d96c1ded /runtime/uprobes-common.h | |
parent | 75de0a1f306ecedfe992b9b3ad8b8f2f76d8d24a (diff) | |
download | systemtap-steved-cc52276b5ecd4501271d3846ad3519c7db03b54f.tar.gz systemtap-steved-cc52276b5ecd4501271d3846ad3519c7db03b54f.tar.xz systemtap-steved-cc52276b5ecd4501271d3846ad3519c7db03b54f.zip |
Move userspace probing boiler plate code in translator to runtime library.
Diffstat (limited to 'runtime/uprobes-common.h')
-rw-r--r-- | runtime/uprobes-common.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/runtime/uprobes-common.h b/runtime/uprobes-common.h new file mode 100644 index 00000000..68741f4d --- /dev/null +++ b/runtime/uprobes-common.h @@ -0,0 +1,37 @@ +/* -*- linux-c -*- + * Copyright (C) 2010 Red Hat Inc. + * + * This file is part of systemtap, and is free software. You can + * redistribute it and/or modify it under the terms of the GNU General + * Public License (GPL); either version 2, or (at your option) any + * later version. + */ + +#ifndef _UPROBE_COMMON_H_ +#define _UPROBE_COMMON_H_ + +struct stap_uprobe { + union { struct uprobe up; struct uretprobe urp; }; + int spec_index; /* index into stap_uprobe_specs; <0 == free && unregistered */ + unsigned long sdt_sem_address; +}; + +struct stap_uprobe_tf { + struct stap_task_finder_target finder; + const char *pathname; +}; + +struct stap_uprobe_spec { + unsigned tfi; + unsigned return_p:1; + unsigned long address; + const char *pp; + void (*ph) (struct context*); + unsigned long sdt_sem_offset; + }; + +static int stap_uprobe_process_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, int register_p, int process_p); +static int stap_uprobe_mmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, char *path, unsigned long addr, unsigned long length, unsigned long offset, unsigned long vm_flags); +static int stap_uprobe_munmap_found (struct stap_task_finder_target *tgt, struct task_struct *tsk, unsigned long addr, unsigned long length); + +#endif /* _UPROBE_COMMON_H_ */ |