summaryrefslogtreecommitdiffstats
path: root/tapset/context.stp
diff options
context:
space:
mode:
authorfche <fche>2006-04-25 17:40:53 +0000
committerfche <fche>2006-04-25 17:40:53 +0000
commit1b07c728305a32a8d1fa1bb5da9d428e34dddf4e (patch)
treef86471e86673dbd7ce49f755f7d980aec43a5a58 /tapset/context.stp
parentfe7e582fac54df14452fa017529bf642f2047e5f (diff)
downloadsystemtap-steved-1b07c728305a32a8d1fa1bb5da9d428e34dddf4e.tar.gz
systemtap-steved-1b07c728305a32a8d1fa1bb5da9d428e34dddf4e.tar.xz
systemtap-steved-1b07c728305a32a8d1fa1bb5da9d428e34dddf4e.zip
2006-04-25 Frank Ch. Eigler <fche@elastic.org>
PR 2427. * staptree.cxx (varuse_collecting_visitor::visit_embeddedcode): Support /* pure */ declaration. Stop using __tvar_ naming hack. (v_c_u::visit_print_format): Mark sprint and sprintf as side-effect-free. (deep_copy_visitor::visit_print_format): Propagate raw_components. * stap.1.in: Document declaration. * elaborate.cxx (semantic_pass_opt2): Verbose message tweak. (dead_stmtexpr_remover): Extend for more aggressive optimization. * tapsets.cxx (dwarf,mark_var_expanding_copy_visotor): Add /* pure */ declaration to rvalue expansions. * tapset/*.stp: Added /* pure */ declarations to many functions. * testsuite/parseok/unparsers.stp: Propagate guru mode flag. * testsuite/buildok/twentyfour.stp: New test.
Diffstat (limited to 'tapset/context.stp')
-rw-r--r--tapset/context.stp34
1 files changed, 17 insertions, 17 deletions
diff --git a/tapset/context.stp b/tapset/context.stp
index a93b36b3..221c853b 100644
--- a/tapset/context.stp
+++ b/tapset/context.stp
@@ -18,7 +18,7 @@ function print_backtrace () %{
}
%}
-function backtrace:string () %{
+function backtrace:string () %{ /* pure */
if (CONTEXT->regs) {
/* XXX: this won't be necessary when runtime and translator */
/* agree on what a string is. */
@@ -29,47 +29,47 @@ function backtrace:string () %{
strlcpy (THIS->__retvalue, "", MAXSTRINGLEN);
%}
-function execname:string () %{
+function execname:string () %{ /* pure */
strlcpy (THIS->__retvalue, current->comm, MAXSTRINGLEN);
%}
-function pid:long () %{
+function pid:long () %{ /* pure */
THIS->__retvalue = current->tgid;
%}
-function tid:long () %{
+function tid:long () %{ /* pure */
THIS->__retvalue = current->pid;
%}
-function ppid:long () %{
+function ppid:long () %{ /* pure */
THIS->__retvalue = current->parent->tgid;
%}
-function pexecname:string () %{
+function pexecname:string () %{ /* pure */
strlcpy (THIS->__retvalue, current->parent->comm, MAXSTRINGLEN);
%}
-function gid:long () %{
+function gid:long () %{ /* pure */
THIS->__retvalue = current->gid;
%}
-function egid:long () %{
+function egid:long () %{ /* pure */
THIS->__retvalue = current->egid;
%}
-function uid:long () %{
+function uid:long () %{ /* pure */
THIS->__retvalue = current->uid;
%}
-function euid:long () %{
+function euid:long () %{ /* pure */
THIS->__retvalue = current->euid;
%}
-function cpuid:long () %{
+function cpuid:long () %{ /* pure */
THIS->__retvalue = current->thread_info->cpu;
%}
-function cpu:long () %{
+function cpu:long () %{ /* pure */
THIS->__retvalue = current->thread_info->cpu; /* smp_processor_id()? */
%}
@@ -84,11 +84,11 @@ function print_stack(stk:string) %{
}
%}
-function pp:string () %{
+function pp:string () %{ /* pure */
strlcpy (THIS->__retvalue, CONTEXT->probe_point, MAXSTRINGLEN);
%}
-function probefunc:string () %{
+function probefunc:string () %{ /* pure */
char *start = strstr(CONTEXT->probe_point, "function(\"");
if (start) {
char *ptr = start+10;
@@ -100,7 +100,7 @@ function probefunc:string () %{
}
%}
-function is_return:long () %{
+function is_return:long () %{ /* pure */
char *ptr = strrchr(CONTEXT->probe_point, '.');
if (ptr) {
if (strcmp(ptr+1,"return") == 0)
@@ -108,11 +108,11 @@ function is_return:long () %{
}
%}
-function target:long () %{
+function target:long () %{ /* pure */
THIS->__retvalue = _stp_target;
%}
-function returnval:long () %{
+function returnval:long () %{ /* pure */
if (CONTEXT->regs) {
#if defined (__i386__)
THIS->__retvalue = CONTEXT->regs->eax;