From mboxrd@z Thu Jan 1 00:00:00 1970 From: syed.shariyar@gmail.com (Shariyar) Date: Thu, 28 Nov 2013 19:29:30 -0500 Subject: [lttng-dev] Extracting System Call IDs By Using TMF Message-ID: Hi, I need information on how to extract system call ids from a kernel level trace by using TMF. For example, a sample code to iterate through a kernel trace in CTF format is given below. In this code, I am able to extract the system call name and its return value. However, from the *event.getContent()* function, I could not get the system call id for the corresponding system call name. Kindly let me know, how to extract the system call id? By system call id I mean the actual system call id assigned by Linux to a system call as shown on this site: http://syscalls.kernelgrok.com/ ///////////////////////////////////////////////Code ////////////////////////////////////// public void readTrace(){ CtfIterator traceIterator=trace.createIterator(); while (traceIterator.advance()){ CtfTmfEvent event = traceIterator.getCurrentEvent(); ITmfEventField content = event.getContent(); String eventName=event.getEventName(); ITmfEventField sys_exit=content.getField("ret"); if (sys_exit != null) System.out.println("Ret: "+sys_exit.getValue()); if (eventName.startsWith(LttngStrings.SYSCALL_PREFIX) || eventName.startsWith(LttngStrings.COMPAT_SYSCALL_PREFIX)) { System.out.println(eventName); } } } ///////////////////////////////////////////////Code ////////////////////////////////////// Regards, Shariyar -------------- next part -------------- An HTML attachment was scrubbed... URL: