6

I'm trying to find the source of CoW page faults in some C code on OS X. I would like to use the vminfo DTrace provider, but vminfo isn't available on OS X. On Linux, I can use SystemTap to print a stack trace on a CoW fault. Is there a way to do this on OS X?

1

Looks like you want to disable dtrace SIP protection.

See my similar answer over in apple.stackexchange for disabling dtrace protection in SIP.

I've got SIP enabled without dtrace, and have access to vminfo.

# uname -a
Darwin Phoenix.local 15.4.0 Darwin Kernel Version 15.4.0: Fri Feb 26 22:08:05 PST 2016; root:xnu-3248.40.184~3/RELEASE_X86_64 x86_64
# dtrace -n 'vminfo:::cow_fault {trace(probefunc)}'     
dtrace: description 'vminfo:::cow_fault ' matched 2 probes
CPU     ID                    FUNCTION:NAME
  0   1182 vm_page_validate_cs_mapped_chunk:cow_fault   vm_page_validate_cs_mapped_chunk 
  0   1182 vm_page_validate_cs_mapped_chunk:cow_fault   vm_page_validate_cs_mapped_chunk 
  0   1182 vm_page_validate_cs_mapped_chunk:cow_fault   vm_page_validate_cs_mapped_chunk 
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.