how does attaching tusc to a process effect that process? (29 Views)
Reply
Advisor
Richard Hubbell
Posts: 24
Registered: ‎01-27-2000
Message 1 of 3 (29 Views)

how does attaching tusc to a process effect that process?

I've noticed when looking at a process( that is behaving
badly) with tusc that as soon as I attach tusc to the process
the CPU consumption of that process drops dramtically.
Apparently tusc serializes the process. Can someone
here tell me exactly what's happening if possible?

The process is multi-threaded.
Honored Contributor
Shannon Petry
Posts: 1,343
Registered: ‎12-17-1998
Message 2 of 3 (29 Views)

Re: how does attaching tusc to a process effect that process?

I can not give all the specifics on what happens, but here is what I know anyway.

Tusc intercepts all calls from that application, usually making it much slower. When the application performs a task like "malloc", tusc intercepts the call, performs the call for the application, and passes the memory space back to the application. It is supposed to be a middle-man for the application allowing for debugging applications.

Perhaps tusc operates at a low system priority it does not take up as much CPU, but more likely it is because tusc is intercepting all calls, logging each call, then performing the call, and logging the result, then giving the called resource back to the application it does not need that much CPU :)

Regards,
Shannon
Microsoft. When do you want a virus today?
Honored Contributor
Brian Hackley
Posts: 394
Registered: ‎01-31-2001
Message 3 of 3 (29 Views)

Re: how does attaching tusc to a process effect that process?

Richard,
Here's a note about tusc that you might find helpful:

Tusc
Uses ptrace() and ttrace() (what debuggers use) to gather it's statistics. This was created for HPUX 11 by Chris Bertin.

Strength: As compared to "trace", it prints out a little more useful info with some system calls and is able to trace signals. Kartik's (original author of trace) assessment of tusc as compared to trace: "Tusc is a better program overall than trace. One of its biggest benefits is that tusc can display the contents of buffers passed to system calls, whereas my trace program could not."

Weakness: It is probably as bad as some other tools in it's skewing of timing and possibly program behavior due to the context switching per traced item (with every traced signal and event).

Hope this helps,

Brian Hackley
Ask me about telecommuting!
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.