• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Relating dtrace thread ids to Java threads
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Relating dtrace thread ids to Java threads


  • Subject: Relating dtrace thread ids to Java threads
  • From: Paul Johnson <email@hidden>
  • Date: Sat, 29 Aug 2009 11:17:47 +1200

Hello, i've been trying to timestamp when context switches occur in the kernel using this dtrace script: http://lists.apple.com/archives/perfoptimization-dev/2007/Dec/msg00011.html.  dtrace is used to gather the context switch information and probes in the Java program is used to gather the rest of the information.

The problem i'm having is that the thread id returned by curthread in the dtrace script is different from the result returned by the pthread_self() call that I make in a JNI method.  The documentation says that curthread and tid are the same as that returned pthread_self() however I suspect that is a holdover from the solaris docs.

Where does curthread come from and is there a way to get it using a method in userspace? is there a different way to relate the data? should I just try Solaris?

I'm aware that this will probably be non-portable and likely to break if the kernel is changed.

Paul Johnson

email@hidden

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Relating dtrace thread ids to Java threads
      • From: Terry Lambert <email@hidden>
  • Prev by Date: dtrace and missing a good chunk of startup time
  • Next by Date: Re: where does initialization time go?
  • Previous by thread: Re: Darwin Open Source Release
  • Next by thread: Re: Relating dtrace thread ids to Java threads
  • Index(es):
    • Date
    • Thread