Say, I want to monitor the responsiveness of a program or how much memory/cpu that process in using when doing a particular job. Is this possible?

I am not talking about monitoring task manager. I was looking for something more sophisticated method that could identify , what process or what subsystem is causing the ir-responsiveness for that program etc etc.