systrace: add kernel function tracing support

Change-Id: I7a446c7604ea29ffd58e59114b646720f97bdc85
diff --git a/systrace.py b/systrace.py
index e5da99d..83033e0 100755
--- a/systrace.py
+++ b/systrace.py
@@ -30,6 +30,8 @@
                     help='trace for N seconds', metavar='N')
   parser.add_option('-b', '--buf-size', dest='trace_buf_size', type='int',
                     help='use a trace buffer size of N KB', metavar='N')
+  parser.add_option('-k', '--ktrace', dest='kfuncs', action='store',
+                    help='specify a comma-separated list of kernel functions to trace')
   parser.add_option('-l', '--list-categories', dest='list_categories', default=False,
                     action='store_true', help='list the available categories and exit')
   parser.add_option('-a', '--app', dest='app_name', default=None, type='string',
@@ -73,6 +75,9 @@
     if options.app_name is not None:
       atrace_args.extend(['-a', options.app_name])
 
+    if options.kfuncs is not None:
+      atrace_args.extend(['-k', options.kfuncs])
+
     atrace_args.extend(args)
 
   if atrace_args[0] == 'adb':