This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: Return values for vm.pagefault.return changed with newer kernels
- From: William Cohen <wcohen at redhat dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: SystemTAP <systemtap at sources dot redhat dot com>
- Date: Thu, 05 Feb 2009 16:01:50 -0500
- Subject: Re: Return values for vm.pagefault.return changed with newer kernels
- References: <4989F643.8090204@redhat.com> <y0mtz79lyr5.fsf@ton.toronto.redhat.com>
Frank Ch. Eigler wrote:
> William Cohen <wcohen@redhat.com> writes:
>
>> [...]
>> Seems like the saner way to take care of this is to move the this information
>> into the tapsets/memory.stp [...]
>>
>> function vm_fault_minor(long:fault_no)
>> function vm_fault_major(long:fault_no)
>> function vm_fault_oom(long:fault_no)
>> function vm_fault_sigbus(long:fault_no)
>> function vm_fault_error(long:fault_no)
>
> I guess we need to speculate about future uses and possible future
> changes of this stuff. It would make about as much sense to have
> something smaller api-wise:
>
> a single test function
> function vm_fault_class_p(fault_number:long, class:string)
> and a variable that lists available classes
> global vm_fault_classes:string []
>
> ... or else to have code that converts the old style enums to new
> style bit masks in some tapset variable.
>
>
> - FChE
I was thinking about an alternative that converted the fault number into a
string, similar to the errno_str function in the errno.stp.
function vm_fault_str(long:fault_no)
Multiple bits would be separated with |. Thus, vm_fault_str(0xc) would return
"VM_FAULT_MAJOR|VM_FAULT_WRITE"
-Will