From: Josh Stone Date: Wed, 11 Jun 2014 01:21:19 +0000 (-0700) Subject: tapset: use an autocast mm in env_var and cmdline_args X-Git-Tag: release-2.6~102 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=250368b3d09d740f3e9614080169a07cb9015ca7;p=systemtap.git tapset: use an autocast mm in env_var and cmdline_args --- diff --git a/tapset/linux/context-envvar.stp b/tapset/linux/context-envvar.stp index e7851d39e..61ae632f2 100644 --- a/tapset/linux/context-envvar.stp +++ b/tapset/linux/context-envvar.stp @@ -28,8 +28,8 @@ function env_var:string(name:string) mm = @cast(task_current(), "task_struct", "kernel")->mm; if (mm) { - env_start = @cast(mm, "mm_struct", "kernel")->env_start; - env_end = @cast(mm, "mm_struct", "kernel")->env_end; + env_start = mm->env_start; + env_end = mm->env_end; if (env_start != 0 && env_end != 0) { len = env_end - env_start; diff --git a/tapset/linux/context.stp b/tapset/linux/context.stp index 3c3dfbfd4..5ef56e880 100644 --- a/tapset/linux/context.stp +++ b/tapset/linux/context.stp @@ -422,8 +422,8 @@ function cmdline_args:string(n:long, m:long, delim:string) if (__mm == 0) return ""; - __arg_start = @cast(__mm, "mm_struct", "kernel")->arg_start; - __arg_end = @cast(__mm, "mm_struct", "kernel")->arg_end; + __arg_start = __mm->arg_start; + __arg_end = __mm->arg_end; if (__arg_start == 0 || __arg_end == 0) return "";