New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Asking about Mach (and how to trace context switch by Dtrace)


Post Reply New Thread Subscribe

 
Thread Tools
mountaintai

 
Member Since: Jul 30, 2007
Posts: 1
mountaintai is on a distinguished road

mountaintai is offline
Hi,

A have a question about tracing context switch events on Mac OS 10.5 based on dtrace. I would like to ask a more general question about Mach and then describe my specific question.

My generl question about Mach is: Does all system call of Darwin finally call some mach_kernel methods? I'm new to Mac and not very clear about the relationship between Mach and Darwin.

My specific question about tracing context switch events is to figure out the right dtrace probes I shall enable. Since I cannot find sched provider on Mac OS 10.5, I want to turn to find the corresponding mach_kernel calls and enable them according to fbt provider. I found a mach_kernel naming thread_switch but I'm not sure whether other mach_kernel methods will result in the context switch. Or other system calls besides mach_kernel calls?

Any ideas about these two questions are appreciated.
QUOTE Thanks
jdgti

 
jdgti's Avatar
 
Member Since: Mar 14, 2005
Location: Atlanta, GA
Posts: 444
jdgti will become famous soon enough
Mac Specs: 17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM

jdgti is offline
"My generl question about Mach is: Does all system call of Darwin finally call some mach_kernel methods? I'm new to Mac and not very clear about the relationship between Mach and Darwin."

I am sure that if you do an all system call the mach_kernel would eventually be reached, but I am not sure how to prove this... I guess that is your question.

First step is to go here: http://developer.apple.com/ and search forums.

I found a good article here: http://www.mactech.com/articles/mact...ace/index.html

These are great examples and I found a few tags you can use with DTrace to see where the program is going. Are you debugging some code your wrote, or are you trying to find out if a application is eventually accessing the kernel when you do something within the application? Are you writing a plug-in or something?
QUOTE Thanks

Post Reply New Thread Subscribe


« New to Mac/Darwin OS, need help on routing command | Xcode help please =( »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

All times are GMT -4. The time now is 03:05 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?