Questions tagged [dtrace]

DTrace is a comprehensive dynamic tracing framework for the Solaris Operating Environment, Mac OS X 10.5+ and FreeBSD.

DTrace is a comprehensive dynamic tracing framework for the Solaris Operating Environment; it provides a powerful infrastructure to permit administrators, developers, and service personnel to concisely answer arbitrary questions about the behavior of the operating system and user programs.

DTrace can be used to get a global overview of a running system, such as the amount of memory, CPU time, file-system and network resources used by the active processes. It can also provide much more fine-grained information, such as a log of the arguments with which a specific function is being called, or a list of the processes accessing a specific file.

Resources

266 questions
0
votes
0 answers

How do I make a dtrace probe only execute when a certain function is in the stack

OK, this is "fun." I'm trying to figure out a weird thread timeout in a program, and need to look at what is happening when pthread_cond_timedwait() returns on Solaris... But... Only when a certain wrapper function or functions are being called…
Brian Cowan
  • 1,048
  • 6
  • 7
0
votes
0 answers

How to debug this MacOS old bug: The application "Preview.app" is not open anymore

Since many versions of MacOS, I got different applications leaving a ghost version only visible at the Finder and Dock level but not at the basic Unix level. Here is the usual error message the Finder does display when trying to start such a ghost…
dan
  • 199
  • 1
  • 8
0
votes
2 answers

Can DTrace of Java be used for Non Unix Like OS such as windows?

Can DTrace feature provided by Java6 be used on Windows?
Sandeep Jindal
  • 14,510
  • 18
  • 83
  • 121
0
votes
2 answers

Solaris tool to trace library API's

I want to trace all the functions which an application calls. Here, I am not looking for system calls, but the library API's mainly. I have tried truss, it is not showing some library API's which I am expecting. Is there any tool in solaris like…
aaa
  • 415
  • 6
  • 15
0
votes
1 answer

Creating dtrace probes for plugins using single provider name

Note that this is for Mac OS X, although I imagine my problem would exist on any dtrace-capable OS. I have an app that utilizes a lot of plugins. I'm adding userland probes to it, in both the core application and in the plugins themselves. The…
MyztikJenz
  • 1,650
  • 14
  • 19
0
votes
1 answer

Java method direct invocation vs single element loop invocation

Recently I wanted to see what is the performance difference invoking a method on an object directly, vs invoking the same method on the same object, If that objected is added in a single element ArrayList and we try to loop that one element List. To…
nikkatsa
  • 1,751
  • 4
  • 26
  • 43
0
votes
1 answer

Pushing Solaris script output across network to Windows client?

I've got a simple Solaris DTrace script that outputs some disk stats continuously. By default, the output gets chucked to STDOUT, so I can redirect to a file to capture the data. What I'm looking for is the ability to grab that data remotely. My…
growse
  • 3,554
  • 9
  • 43
  • 66
0
votes
1 answer

How can I use Dtrace to calculate the time taken between arbitrary C statements

I'm using ImageMagick(via PHP imagick extension) to generate a simple gif animation, like this one. And I've found WriteGIFImage()(https://github.com/ImageMagick/ImageMagick/blob/c807b69de68a33b42fc8725486d5ac81688afd16/coders/gif.c#L1506) function…
da_miao_zi
  • 351
  • 1
  • 11
0
votes
1 answer

Formatting/printing execve arguments

I'm trying to print out the environment from an execve call. I'm capturing this via: syscall::exec*:entry { printf("%i %i %s %s\n", ppid, pid, execname, copyinstr(arg0)); } But I can't seem to convince dtrace that arg2[0] is something that could…
viraptor
  • 33,322
  • 10
  • 107
  • 191
0
votes
2 answers

How does `dtrace` probe memory allocations (Mac OS)

Does anyone know what function / mechanism is dtrace using for tracking mallocs? I'm trying to profile a piece of code, which I can do with the aid of debugger and some command line scripting, i.e.: sudo dtrace -n "pid`pgrep Mail | head -n…
the swine
  • 10,713
  • 7
  • 58
  • 100
0
votes
0 answers

Convert connect address with address familiy AF_SYSTEM to human readable string

Background I'm writing some dtrace program which tracks application socket file descriptors. Aim is to provide logs which help me spot leak of file descriptors in some very complex OS X application. Here is my other question with very helpful…
Marek R
  • 32,568
  • 6
  • 55
  • 140
0
votes
0 answers

Is DTrace as useful in Dynamic and Runtime languesg like Python and Java?

As much as I understand from Dtrace docs, it can be very useful in Native-compiled languages (C, C++, D, Haskell, Rust, Go...) since debugging and tracing compiled binary code is difficult in those languages particularly when there is no debug…
Kamyar
  • 2,494
  • 2
  • 22
  • 33
0
votes
0 answers

Tracing a PID using multiple dtrace scripts

I am trying to run multiple dtrace scripts at the same time which does on-cpu and off-cpu stack traces of the same pid. After I run one of the script, the second one throws an error saying that pid is already being traced. Is there any way to run…
0
votes
1 answer

Escaping probefunc

I listed the probes in my application: sudo dtrace -p "$(pgrep run)" -ln 'pid$target:QtCore:*sendPostedEvents*:entry {}' ID PROVIDER MODULE FUNCTION NAME 8037 pid53854 QtCore…
Birchlabs
  • 7,437
  • 5
  • 35
  • 54
0
votes
1 answer

How can I use dtrace (or whatever) to find out where the config file is for ddclient on my mac?

I cannot find an example of how to do this anywhere: I have ddclient installed on my mac, but none of the command line switches appear to have any effect, so I'm trying to modify the config but I can't find the darn thing. So I figured that since…
Wayne Werner
  • 49,299
  • 29
  • 200
  • 290