From: fche@redhat.com (Frank Ch. Eigler)
To: Rajasekhar Duddu <rajduddu@linux.vnet.ibm.com>
Cc: systemtap@sources.redhat.com
Subject: Re: [PATCH V4] Tracepoint Tapset for Memory Subsystem
Date: Mon, 30 Nov 2009 16:26:00 -0000 [thread overview]
Message-ID: <y0m1vjgx9lh.fsf@fche.csb> (raw)
In-Reply-To: <20091125093051.GA13363@rajduddu> (Rajasekhar Duddu's message of "Wed, 25 Nov 2009 15:00:51 +0530")
Rajasekhar Duddu <rajduddu@linux.vnet.ibm.com> writes:
> [...]
> +%{
> +#define __GFP_BITMASKS(FLAG) if(gfp_flag & FLAG) { if(THIS->__retvalue[0] != '\0') \
> + strlcat(THIS->__retvalue, " | "#FLAG, MAXSTRINGLEN); \
> + else strlcat(THIS->__retvalue, #FLAG, MAXSTRINGLEN); }
> +%}
> +%{
> +#define __GFP_COMPOSITE_FLAG(FLAG) if(gfp_flag == FLAG) { \
> + strlcat(THIS->__retvalue, #FLAG, MAXSTRINGLEN); return; }
> +%}
These should be defined within the embedded-c function block below,
and should be #undef'd there too, to avoid polluting the namespace.
>[...]
> --- a/testsuite/systemtap.examples/memory/vm.tracepoints.stp 1969-12-31 19:00:00.000000000 -0500
> +++ b/testsuite/systemtap.examples/memory/vm.tracepoints.stp 2009-11-25 04:06:21.000000000 -0500
> @@ -0,0 +1,18 @@
> +global slabs
> +
> +probe vm.kmem_cache_alloc {
> + slabs [execname(), bytes_req]++
> +}
> +
> +probe timer.ms(10000)
> +{
> + dummy = "";
> + foreach ([name, bytes] in slabs) {
> + if (dummy != name)
> + printf("\nProcess:%s\n", name);
> + printf("Slab_size:%d\tCount:%d\n", bytes, slabs[name, bytes]);
> + dummy = name;
> + }
> + delete slabs
> + printf("\n-------------------------------------------------------\n\n")
> +}
As a matter of style, this would be nearly equivalent to all of that,
except for reporting once at the end rather than every 10 seconds.
global slabs
probe vm.kmem_cache_alloc {
slabs [execname(), bytes_req]<<<1
}
Please confirm that the tapset reference documentation template is
configured to extract the @@doc stuff from the tapset.
Please add a sentence to NEWS to describe the new tapset. (Others
who recently added tapset extensions should do the same!)
Please commit with those changes.
- FChE
next prev parent reply other threads:[~2009-11-30 16:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 9:31 Rajasekhar Duddu
2009-11-30 16:26 ` Frank Ch. Eigler [this message]
2009-12-04 12:09 ` [PATCH V5] " Rajasekhar Duddu
2009-12-07 2:52 ` Wenji Huang
2009-12-09 6:57 ` Rajasekhar Duddu
2009-12-11 18:36 ` [PATCH V6] " Rajasekhar Duddu
2009-12-21 11:46 ` Prerna Saxena
2009-12-21 21:49 ` Mark Wielaard
2009-12-22 17:02 ` Prerna Saxena
2009-12-29 21:36 ` Mark Wielaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=y0m1vjgx9lh.fsf@fche.csb \
--to=fche@redhat.com \
--cc=rajduddu@linux.vnet.ibm.com \
--cc=systemtap@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).