summaryrefslogtreecommitdiffstats
path: root/tapset
diff options
context:
space:
mode:
authorJosh Stone <joshua.i.stone@intel.com>2008-06-13 19:32:59 -0700
committerJosh Stone <joshua.i.stone@intel.com>2008-06-13 19:38:35 -0700
commite8402528a3e3f77fa804904e875453039ed4abee (patch)
treeca57302fdf673e85191ccc1d78c31e9581df86c9 /tapset
parent9d0808b420815955053cd503e9fc2ab1180f70b6 (diff)
downloadsystemtap-steved-e8402528a3e3f77fa804904e875453039ed4abee.tar.gz
systemtap-steved-e8402528a3e3f77fa804904e875453039ed4abee.tar.xz
systemtap-steved-e8402528a3e3f77fa804904e875453039ed4abee.zip
Add 'pure' to embedded-C functions that deserve it
Diffstat (limited to 'tapset')
-rw-r--r--tapset/ChangeLog6
-rw-r--r--tapset/aux_syscalls.stp2
-rw-r--r--tapset/ctime.stp2
-rw-r--r--tapset/i686/registers.stp10
-rw-r--r--tapset/inet.stp12
-rw-r--r--tapset/memory.stp3
-rw-r--r--tapset/ppc64/registers.stp4
-rw-r--r--tapset/s390x/syscalls.stp2
-rw-r--r--tapset/x86_64/registers.stp8
9 files changed, 27 insertions, 22 deletions
diff --git a/tapset/ChangeLog b/tapset/ChangeLog
index 5c89aed5..0293c390 100644
--- a/tapset/ChangeLog
+++ b/tapset/ChangeLog
@@ -1,3 +1,9 @@
+2008-06-13 Josh Stone <joshua.i.stone@intel.com>
+
+ * aux_syscalls.stp, ctime.stp, inet.stp, memory.stp,
+ s390x/syscalls.stp, {i686,x86_64,ppc64}/registers.stp: Add
+ 'pure' to embedded-C functions that deserve it.
+
2008-06-13 Zhaolei <zhaolei@cn.fujitsu.com>
* syscalls.stp: Add sys_fchownat.
diff --git a/tapset/aux_syscalls.stp b/tapset/aux_syscalls.stp
index 2bd2ced4..bb0547f9 100644
--- a/tapset/aux_syscalls.stp
+++ b/tapset/aux_syscalls.stp
@@ -1787,7 +1787,7 @@ function _mmap_flags:string(flags:long)
# old mmap functions passed in a struct like this.
#
function get_mmap_args:string (args:long)
-%{
+%{ /* pure */
#if defined (__x86_64__) || defined (__ia64__)
struct mmap_arg_struct {
unsigned int addr;
diff --git a/tapset/ctime.stp b/tapset/ctime.stp
index 96af4d47..d907c2db 100644
--- a/tapset/ctime.stp
+++ b/tapset/ctime.stp
@@ -41,7 +41,7 @@
*/
function ctime:string(epochsecs:long)
-%{
+%{ /* pure */
#define SECSPERMIN 60L
#define MINSPERHOUR 60L
diff --git a/tapset/i686/registers.stp b/tapset/i686/registers.stp
index f7437ebb..c4c84814 100644
--- a/tapset/i686/registers.stp
+++ b/tapset/i686/registers.stp
@@ -24,13 +24,13 @@ function _stp_register_regs() {
_stp_regs_registered = 1
}
-function _stp_get_register_by_offset:long (offset:long) %{
+function _stp_get_register_by_offset:long (offset:long) %{ /* pure */
long value;
memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value));
THIS->__retvalue = value;
%}
-function _stp_probing_kernel:long () %{
+function _stp_probing_kernel:long () %{ /* pure */
THIS->__retvalue = !user_mode(CONTEXT->regs);
%}
@@ -38,12 +38,12 @@ function _stp_probing_kernel:long () %{
* esp and ss aren't saved on a breakpoint in kernel mode, so
* the pre-trap stack pointer is &regs->sp.
*/
-function _stp_kernel_sp:long (sp_offset:long) %{
+function _stp_kernel_sp:long (sp_offset:long) %{ /* pure */
THIS->__retvalue = ((long) CONTEXT->regs) + THIS->sp_offset;
%}
/* Assume ss register hasn't changed since we took the trap. */
-function _stp_kernel_ss:long () %{
+function _stp_kernel_ss:long () %{ /* pure */
unsigned short ss;
asm volatile("movw %%ss, %0" : : "m" (ss));
THIS->__retvalue = ss;
@@ -80,7 +80,7 @@ function u_register:long (name:string) {
}
/* Return the value of function arg #argnum (1=first arg) as a signed value. */
-function _stp_arg:long (argnum:long) %{
+function _stp_arg:long (argnum:long) %{ /* pure */
long val;
int n, nr_regargs, result;
diff --git a/tapset/inet.stp b/tapset/inet.stp
index 0fdd4bab..8681fa2c 100644
--- a/tapset/inet.stp
+++ b/tapset/inet.stp
@@ -1,8 +1,8 @@
/* Some functions from libc <arpa/inet.h> */
-function htonll:long (x:long) %{ THIS->__retvalue = (int64_t) cpu_to_be64 ((u64) THIS->x); %}
-function htonl:long (x:long) %{ THIS->__retvalue = (int64_t) cpu_to_be32 ((u32) THIS->x); %}
-function htons:long (x:long) %{ THIS->__retvalue = (int64_t) cpu_to_be16 ((u16) THIS->x); %}
-function ntohll:long (x:long) %{ THIS->__retvalue = (int64_t) be64_to_cpu ((u64) THIS->x); %}
-function ntohl:long (x:long) %{ THIS->__retvalue = (int64_t) be32_to_cpu ((u32) THIS->x); %}
-function ntohs:long (x:long) %{ THIS->__retvalue = (int64_t) be16_to_cpu ((u16) THIS->x); %}
+function htonll:long (x:long) %{ /* pure */ THIS->__retvalue = (int64_t) cpu_to_be64 ((u64) THIS->x); %}
+function htonl:long (x:long) %{ /* pure */ THIS->__retvalue = (int64_t) cpu_to_be32 ((u32) THIS->x); %}
+function htons:long (x:long) %{ /* pure */ THIS->__retvalue = (int64_t) cpu_to_be16 ((u16) THIS->x); %}
+function ntohll:long (x:long) %{ /* pure */ THIS->__retvalue = (int64_t) be64_to_cpu ((u64) THIS->x); %}
+function ntohl:long (x:long) %{ /* pure */ THIS->__retvalue = (int64_t) be32_to_cpu ((u32) THIS->x); %}
+function ntohs:long (x:long) %{ /* pure */ THIS->__retvalue = (int64_t) be16_to_cpu ((u16) THIS->x); %}
diff --git a/tapset/memory.stp b/tapset/memory.stp
index 630e8984..a2d9cc19 100644
--- a/tapset/memory.stp
+++ b/tapset/memory.stp
@@ -46,8 +46,7 @@ probe vm.pagefault.return = kernel.function("__handle_mm_fault@mm/memory.c").ret
}
/* Return which node the given address belongs to in a NUMA system */
-function addr_to_node:long(addr:long) /* pure */
-%{
+function addr_to_node:long(addr:long) %{ /* pure */
int nid;
int pfn = __pa(THIS->addr) >> PAGE_SHIFT;
for_each_online_node(nid)
diff --git a/tapset/ppc64/registers.stp b/tapset/ppc64/registers.stp
index ea520892..6a8ae279 100644
--- a/tapset/ppc64/registers.stp
+++ b/tapset/ppc64/registers.stp
@@ -58,11 +58,11 @@ function _stp_register_regs() {
_stp_regs_registered = 1
}
-function probing_32bit_app() %{
+function probing_32bit_app() %{ /* pure */
THIS->__retvalue = _stp_probing_32bit_app(CONTEXT->regs);
%}
-function _stp_get_register_by_offset:long (offset:long) %{
+function _stp_get_register_by_offset:long (offset:long) %{ /* pure */
long value;
memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value));
THIS->__retvalue = value;
diff --git a/tapset/s390x/syscalls.stp b/tapset/s390x/syscalls.stp
index 39236d79..07cb0577 100644
--- a/tapset/s390x/syscalls.stp
+++ b/tapset/s390x/syscalls.stp
@@ -103,7 +103,7 @@ probe syscall.sysctl32.return = kernel.function("sys32_sysctl").return ? {
/* compat */
function get_32mmap_args:string (args:long)
-%{
+%{ /* pure */
struct mmap_arg_struct_emu31 {
u32 addr;
u32 len;
diff --git a/tapset/x86_64/registers.stp b/tapset/x86_64/registers.stp
index 35c8ce49..99c39e18 100644
--- a/tapset/x86_64/registers.stp
+++ b/tapset/x86_64/registers.stp
@@ -38,7 +38,7 @@ function _stp_register_regs() {
_stp_regs_registered = 1
}
-function _stp_get_register_by_offset:long (offset:long) %{
+function _stp_get_register_by_offset:long (offset:long) %{ /* pure */
long value;
memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value));
THIS->__retvalue = value;
@@ -48,7 +48,7 @@ function _stp_get_register_by_offset:long (offset:long) %{
* _stp_sign_extend32() is callable from a script function.
* __stp_sign_extend32() (in regs.c) is callable from a C function.
*/
-function _stp_sign_extend32:long (value:long) %{
+function _stp_sign_extend32:long (value:long) %{ /* pure */
THIS->__retvalue = __stp_sign_extend32(THIS->value);
%}
@@ -98,7 +98,7 @@ function u_register:long (name:string) {
* If sign_extend=1 and (truncate=1 or the probepoint we've hit is in a
* 32-bit app), sign-extend the 32-bit value.
*/
-function _stp_arg:long (argnum:long, sign_extend:long, truncate:long) %{
+function _stp_arg:long (argnum:long, sign_extend:long, truncate:long) %{ /* pure */
long val;
int result, n, nr_regargs;
size_t argsz = sizeof(long);
@@ -170,7 +170,7 @@ deref_fault: /* branched to from deref() */
}
%}
-function probing_32bit_app() %{
+function probing_32bit_app() %{ /* pure */
THIS->__retvalue = _stp_probing_32bit_app(CONTEXT->regs);
%}