builtin-trace.c (b059efdf52a27819b78aa30f171f1e8e439152b6) | builtin-trace.c (7c304ee0fc66b4c21282e1cce32631c263f8c481) |
---|---|
1#include <traceevent/event-parse.h> 2#include "builtin.h" 3#include "util/color.h" | 1#include <traceevent/event-parse.h> 2#include "builtin.h" 3#include "util/color.h" |
4#include "util/debug.h" |
|
4#include "util/evlist.h" 5#include "util/machine.h" 6#include "util/thread.h" 7#include "util/parse-options.h" 8#include "util/strlist.h" 9#include "util/thread_map.h" 10 11#include <libaudit.h> --- 294 unchanged lines hidden (view full) --- 306 goto out_cant_read; 307 308 if ((id > trace->syscalls.max || trace->syscalls.table[id].name == NULL)) 309 goto out_cant_read; 310 311 return &trace->syscalls.table[id]; 312 313out_cant_read: | 5#include "util/evlist.h" 6#include "util/machine.h" 7#include "util/thread.h" 8#include "util/parse-options.h" 9#include "util/strlist.h" 10#include "util/thread_map.h" 11 12#include <libaudit.h> --- 294 unchanged lines hidden (view full) --- 307 goto out_cant_read; 308 309 if ((id > trace->syscalls.max || trace->syscalls.table[id].name == NULL)) 310 goto out_cant_read; 311 312 return &trace->syscalls.table[id]; 313 314out_cant_read: |
314 fprintf(trace->output, "Problems reading syscall %d", id); 315 if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL) 316 fprintf(trace->output, "(%s)", trace->syscalls.table[id].name); 317 fputs(" information", trace->output); | 315 if (verbose) { 316 fprintf(trace->output, "Problems reading syscall %d", id); 317 if (id <= trace->syscalls.max && trace->syscalls.table[id].name != NULL) 318 fprintf(trace->output, "(%s)", trace->syscalls.table[id].name); 319 fputs(" information\n", trace->output); 320 } |
318 return NULL; 319} 320 321static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, 322 struct perf_sample *sample) 323{ 324 char *msg; 325 void *args; --- 383 unchanged lines hidden (view full) --- 709 OPT_UINTEGER('m', "mmap-pages", &trace.opts.mmap_pages, 710 "number of mmap data pages"), 711 OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user", 712 "user to profile"), 713 OPT_CALLBACK(0, "duration", &trace, "float", 714 "show only events with duration > N.M ms", 715 trace__set_duration), 716 OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"), | 321 return NULL; 322} 323 324static int trace__sys_enter(struct trace *trace, struct perf_evsel *evsel, 325 struct perf_sample *sample) 326{ 327 char *msg; 328 void *args; --- 383 unchanged lines hidden (view full) --- 712 OPT_UINTEGER('m', "mmap-pages", &trace.opts.mmap_pages, 713 "number of mmap data pages"), 714 OPT_STRING('u', "uid", &trace.opts.target.uid_str, "user", 715 "user to profile"), 716 OPT_CALLBACK(0, "duration", &trace, "float", 717 "show only events with duration > N.M ms", 718 trace__set_duration), 719 OPT_BOOLEAN(0, "sched", &trace.sched, "show blocking scheduler events"), |
720 OPT_INCR('v', "verbose", &verbose, "be more verbose"), |
|
717 OPT_END() 718 }; 719 int err; 720 char bf[BUFSIZ]; 721 722 argc = parse_options(argc, argv, trace_options, trace_usage, 0); 723 724 if (output_name != NULL) { --- 50 unchanged lines hidden --- | 721 OPT_END() 722 }; 723 int err; 724 char bf[BUFSIZ]; 725 726 argc = parse_options(argc, argv, trace_options, trace_usage, 0); 727 728 if (output_name != NULL) { --- 50 unchanged lines hidden --- |