Results 1 to 2 of 2
  1. #1


    Member Since
    Jul 30, 2007
    Posts
    1
    Asking about Mach (and how to trace context switch by Dtrace)
    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.

  2. #2

    jdgti's Avatar
    Member Since
    Mar 14, 2005
    Location
    Atlanta, GA
    Posts
    443
    Specs:
    17" Macbook Pro Unibody 2.66 Ghz and Powerbook G4 1.67 GHz 2.0GB RAM
    "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?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Hello World app takes 45s to start from the terminal, gcc, gdb and dtrace problems
    By Ethan asdf in forum OS X - Development and Darwin
    Replies: 5
    Last Post: 02-12-2009, 05:03 PM
  2. Deleted Mach Kernel
    By smiles in forum OS X - Operating System
    Replies: 1
    Last Post: 07-09-2008, 05:40 PM
  3. mach kernel - what is it?
    By Stefan in forum OS X - Operating System
    Replies: 6
    Last Post: 11-16-2007, 11:49 AM
  4. mach alias, mach.sym, automount
    By rerks in forum OS X - Operating System
    Replies: 6
    Last Post: 02-21-2007, 07:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •