0

I'm trying to identify what system calls are made by my java program when it runs. Even more specifically, I want to know what java methods invoke what system calls. I've tried strace in Linux:

strace -o output.txt java MyProgram

This, however, outputs every system call my program makes into output.txt, and is not specific to each method. Thanks.

Kara
  • 6,115
  • 16
  • 50
  • 57
DarkyTheOdd
  • 128
  • 1
  • 12
  • Why? What are you trying to do? – SLaks Aug 27 '13 at 17:25
  • Its a part of my Operating Systems class assignment, so there really is no reason ;) – DarkyTheOdd Aug 27 '13 at 17:28
  • Read the OpenJDK source? – SLaks Aug 27 '13 at 17:30
  • I think you would need to use a profiling program to do what you are asking. JetBrains has some nice software: http://www.jetbrains.com/products.html#java – ars265 Aug 27 '13 at 17:30
  • I too interested to know the system call made by java native method. I wanted to see which system call used for name resolution. Above command didnot map to any system call. And return strace like below: ``` [root@sdl21ntf-cluster-4-0-ntf-vm0 ~]# strace -p 4516 strace: Process 4516 attached futex(0x7f7e6f1369d0, FUTEX_WAIT, 4517, NULL) = 0 munmap(0x7f7e5f0b6000, 141534522) = 0 close(3) = 0 exit_group(0) = ? +++ exited with 0 ++ ``` – Ankit Jan 11 '21 at 08:17

0 Answers0