From: syed.shariyar@gmail.com (Shariyar)
Subject: [lttng-dev] Extracting System Call IDs By Using TMF
Date: Thu, 28 Nov 2013 19:29:30 -0500 [thread overview]
Message-ID: <CAKQh6pji+x7NV4nURCeyozMZkbJJXfAbHvLNJJ95y21CoXT-=Q@mail.gmail.com> (raw)
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: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20131128/46db208f/attachment.html>
next reply other threads:[~2013-11-29 0:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-29 0:29 Shariyar [this message]
2013-11-29 15:39 ` Matthew Khouzam
2013-11-29 16:59 ` Francis Giraldeau
2013-12-01 1:23 Shariyar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKQh6pji+x7NV4nURCeyozMZkbJJXfAbHvLNJJ95y21CoXT-=Q@mail.gmail.com' \
--to=syed.shariyar@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox