Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155730
b: refs/heads/master
c: 0fdc7e6
h: refs/heads/master
v: v3
  • Loading branch information
Mike Galbraith authored and Peter Zijlstra committed Jul 22, 2009
1 parent f284119 commit 4b01603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d20ff6bd6bba2e7e6681fa17565347b410c46ab3
refs/heads/master: 0fdc7e67dd312986e30b861adff48732bd33eb3f
6 changes: 5 additions & 1 deletion trunk/tools/perf/builtin-top.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static u64 count_filter = 5;
static int print_entries = 15;

static int target_pid = -1;
static int inherit = 0;
static int profile_cpu = -1;
static int nr_cpus = 0;
static unsigned int realtime_prio = 0;
Expand Down Expand Up @@ -549,7 +550,7 @@ int group_fd;
static void start_counter(int i, int counter)
{
struct perf_counter_attr *attr;
unsigned int cpu;
int cpu;

cpu = profile_cpu;
if (target_pid == -1 && profile_cpu == -1)
Expand All @@ -559,6 +560,7 @@ static void start_counter(int i, int counter)

attr->sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID;
attr->freq = freq;
attr->inherit = (cpu < 0) && inherit;

try_again:
fd[i][counter] = sys_perf_counter_open(attr, target_pid, cpu, group_fd, 0);
Expand Down Expand Up @@ -685,6 +687,8 @@ static const struct option options[] = {
"only display functions with more events than this"),
OPT_BOOLEAN('g', "group", &group,
"put the counters into a counter group"),
OPT_BOOLEAN('i', "inherit", &inherit,
"child tasks inherit counters"),
OPT_STRING('s', "sym-filter", &sym_filter, "pattern",
"only display symbols matchig this pattern"),
OPT_BOOLEAN('z', "zero", &zero,
Expand Down

0 comments on commit 4b01603

Please sign in to comment.