Arun, Patch applied. thanks,
On Fri, Apr 29, 2011 at 2:37 AM, Arun Sharma <asha...@fb.com> wrote: > --- > lib/pfmlib_amd64.c | 3 --- > lib/pfmlib_common.c | 8 +------- > lib/pfmlib_intel_x86.c | 2 -- > lib/pfmlib_perf_event.c | 3 +-- > lib/pfmlib_perf_event_pmu.c | 11 ++++++++--- > perf_examples/self_count.c | 4 +++- > perf_examples/self_pipe.c | 5 ++--- > perf_examples/syst_smpl.c | 3 --- > 8 files changed, 15 insertions(+), 24 deletions(-) > > diff --git a/lib/pfmlib_amd64.c b/lib/pfmlib_amd64.c > index fd6566d..5af7fee 100644 > --- a/lib/pfmlib_amd64.c > +++ b/lib/pfmlib_amd64.c > @@ -393,7 +393,6 @@ pfm_amd64_get_encoding(void *this, pfmlib_event_desc_t *e) > uint64_t umask = 0; > unsigned int plmmsk = 0; > int k, ret, grpid; > - int numasks; > unsigned int grpmsk, ugrpmsk = 0; > int grpcounts[AMD64_MAX_GRP]; > int ncombo[AMD64_MAX_GRP]; > @@ -418,8 +417,6 @@ pfm_amd64_get_encoding(void *this, pfmlib_event_desc_t *e) > reg.sel_int = 1; /* force APIC */ > } > > - numasks = pe[e->event].numasks; > - > for(k=0; k < e->nattrs; k++) { > a = attr(e, k); > > diff --git a/lib/pfmlib_common.c b/lib/pfmlib_common.c > index 77649ad..69eedf2 100644 > --- a/lib/pfmlib_common.c > +++ b/lib/pfmlib_common.c > @@ -429,15 +429,9 @@ static int > pfmlib_init_pmus(void) > { > pfmlib_pmu_t *p; > - int i, ret, n = 0; > + int i, ret; > int nsuccess = 0; > > - if (pfm_cfg.forced_pmu) { > - char *p; > - p = strchr(pfm_cfg.forced_pmu, ','); > - n = p ? p - pfm_cfg.forced_pmu : strlen(pfm_cfg.forced_pmu); > - } > - > /* > * activate all detected PMUs > * when forced, only the designated PMU > diff --git a/lib/pfmlib_intel_x86.c b/lib/pfmlib_intel_x86.c > index 0ebea01..25db478 100644 > --- a/lib/pfmlib_intel_x86.c > +++ b/lib/pfmlib_intel_x86.c > @@ -321,7 +321,6 @@ pfm_intel_x86_encode_gen(void *this, pfmlib_event_desc_t > *e) > { > pfm_event_attr_info_t *a; > const intel_x86_entry_t *pe; > - const pfmlib_attr_desc_t *atdesc; > pfm_intel_x86_reg_t reg; > unsigned int grpmsk, ugrpmsk = 0; > uint64_t umask1, umask2; > @@ -335,7 +334,6 @@ pfm_intel_x86_encode_gen(void *this, pfmlib_event_desc_t > *e) > memset(ncombo, 0, sizeof(ncombo)); > > pe = this_pe(this); > - atdesc = this_atdesc(this); > > e->fstr[0] = '\0'; > > diff --git a/lib/pfmlib_perf_event.c b/lib/pfmlib_perf_event.c > index d2eea5e..1a9735a 100644 > --- a/lib/pfmlib_perf_event.c > +++ b/lib/pfmlib_perf_event.c > @@ -69,7 +69,7 @@ pfmlib_perf_event_encode(void *this, const char *str, int > dfl_plm, void *data) > size_t sz = sizeof(arg); > uint64_t ival; > int has_plm = 0; > - int i, count, plm = 0, ret; > + int i, plm = 0, ret; > > sz = pfmlib_check_struct(uarg, uarg->size, PFM_PERF_ENCODE_ABI0, sz); > if (!sz) > @@ -91,7 +91,6 @@ pfmlib_perf_event_encode(void *this, const char *str, int > dfl_plm, void *data) > return ret; > > pmu = e.pmu; > - count = pmu->max_encoding; > > if (!pmu->get_event_encoding[e.osid]) { > DPRINT("PMU %s does not support PFM_OS_NONE\n", pmu->name); > diff --git a/lib/pfmlib_perf_event_pmu.c b/lib/pfmlib_perf_event_pmu.c > index d16ec4f..0e33035 100644 > --- a/lib/pfmlib_perf_event_pmu.c > +++ b/lib/pfmlib_perf_event_pmu.c > @@ -321,6 +321,10 @@ retry: > goto retry; > } > > +#ifdef __GNUC__ > +#define POTENTIALLY_UNUSED __attribute__((unused)) > +#endif > + > static void > gen_tracepoint_table(void) > { > @@ -333,7 +337,8 @@ gen_tracepoint_table(void) > char id_str[32]; > uint64_t id; > int fd, err; > - int dir2_fd, reuse_event = 0; > + int POTENTIALLY_UNUSED dir2_fd; > + int reuse_event = 0; > int numasks; > char *tracepoint_name; > > @@ -693,7 +698,7 @@ pfm_perf_get_encoding(void *this, pfmlib_event_desc_t *e) > return PFM_ERR_NOTSUPP; > } > > - return PFM_SUCCESS; > + return ret; > } > > static int > @@ -726,7 +731,7 @@ pfm_perf_get_perf_encoding(void *this, > pfmlib_event_desc_t *e) > attr->type = perf_pe[e->event].type; > attr->config = e->codes[0]; > > - return PFM_SUCCESS; > + return ret; > } > > > diff --git a/perf_examples/self_count.c b/perf_examples/self_count.c > index a175899..f3300be 100644 > --- a/perf_examples/self_count.c > +++ b/perf_examples/self_count.c > @@ -127,7 +127,9 @@ read_count(perf_event_desc_t *fds) > uint64_t offset = 0; > uint64_t val; > unsigned int seq; > +#if 0 > double ratio; > +#endif > int ret, idx; > > hdr = fds->buf; > @@ -163,9 +165,9 @@ read_count(perf_event_desc_t *fds) > values[0] += offset; > > val = perf_scale(values); > +#if 0 > ratio = perf_scale_ratio(values); > > -#if 0 > if (ratio == 1.0) > printf("%20"PRIu64" %s (%s)\n", val, fds->name, offset == -1 ? > "syscall" : "rdpmc"); > else > diff --git a/perf_examples/self_pipe.c b/perf_examples/self_pipe.c > index f026051..a67395b 100644 > --- a/perf_examples/self_pipe.c > +++ b/perf_examples/self_pipe.c > @@ -92,7 +92,6 @@ measure(void) > uint64_t values[3]; > int i, ret; > int pr[2], pw[2]; > - ssize_t nbytes; > pid_t pid; > char cc = '0'; > > @@ -168,8 +167,8 @@ measure(void) > * ping pong loop > */ > while(!quit) { > - nbytes = write(pr[1], "c", 1); > - nbytes = read(pw[0], &cc, 1); > + write(pr[1], "c", 1); > + read(pw[0], &cc, 1); > } > > prctl(PR_TASK_PERF_EVENTS_DISABLE); > diff --git a/perf_examples/syst_smpl.c b/perf_examples/syst_smpl.c > index 996fa7c..72bc53e 100755 > --- a/perf_examples/syst_smpl.c > +++ b/perf_examples/syst_smpl.c > @@ -165,7 +165,6 @@ setup_cpu(int cpu, int fd) > { > uint64_t *val; > int ret, flags; > - pid_t pid; > int i; > > /* > @@ -185,10 +184,8 @@ setup_cpu(int cpu, int fd) > > if (options.cgroup) { > flags = PERF_FLAG_PID_CGROUP; > - pid = fd; > } else { > flags = 0; > - pid = -1; > } > > if (options.pin) > -- > 1.7.4 > > ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ perfmon2-devel mailing list perfmon2-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/perfmon2-devel