[PATCH] Tracepoint Tapset for Memory Subsystem

David Smith dsmith@redhat.com
Tue Sep 22 22:05:00 GMT 2009


On 09/22/2009 04:23 PM, Frank Ch. Eigler wrote:
> David Smith <dsmith@redhat.com> writes:
> 
>> [...]
>> function gfp_f:string (gfp_flag:long)
>> %{
>>     switch (THIS->gfp_flag) {
>>         case GFP_ATOMIC:
>>                 strlcpy(THIS->__retvalue, "GFP_ATOMIC", MAXSTRINGLEN);
>>                 break;
>>         case GFP_KERNEL:
>>                 strlcpy(THIS->__retvalue, "GFP_KERNEL", MAXSTRINGLEN);
>>                 break;
>> %}
> 
> Actually, those values are bit masks, so might as well be treated like
> the open flags in syscall*.stp.

While they are bitmasks, I'd much rather see 'GFP_KERNEL' than
'(__GFP_WAIT|__GFP_IO|__GFP_FS)'.

-- 
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)



More information about the Systemtap mailing list