question about pmc_name_of_capability

0 views
Skip to first unread message

ajray

unread,
Jul 1, 2009, 1:04:40 PM7/1/09
to PMCTools Discuss
Hey, I have just a minor question about the libpmc declarations in
lib/libpmc/pmc.h

pmc_name_of_capability() is defined twice, once in pmc.h:

const char *pmc_name_of_capability(uint32_t _c);

and once in libpmc.h

const char *pmc_name_of_capability(enum pmc_caps cap) {...;}

Is this intentional? (I've changed the pmc.h declaration to match the
libpmc.c def'n in my Minix port)

Thanks
~Alex

ajray

unread,
Jul 1, 2009, 9:08:31 PM7/1/09
to PMCTools Discuss
Also, what about the difference in declarations between the
declaration of iaf_allocate_pmc()
in libpmc.c:
static int iaf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct
pmc_op_pmcallocate *_pmc_config);
in hwpmc_core.c:
static int iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, const
struct pmc_op_pmcallocate *a);

Is the code in the middle of being updated? Which one is correct?

Thanks in advance,
~Alex

Joseph Koshy

unread,
Jul 2, 2009, 11:03:54 AM7/2/09
to pmctools...@googlegroups.com

Not intentional. Luckily fixing it doesn't change the ABI on i386/amd64.

Koshy

Joseph Koshy

unread,
Jul 2, 2009, 11:03:54 AM7/2/09
to pmctools...@googlegroups.com

> Also, what about the difference in declarations between the
> declaration of iaf_allocate_pmc()
> in libpmc.c:
> static int iaf_allocate_pmc(enum pmc_event _pe, char *_ctrspec, struct
> pmc_op_pmcallocate *_pmc_config);

This function is internal to libpmc.

> in hwpmc_core.c:
> static int iaf_allocate_pmc(int cpu, int ri, struct pmc *pm, const
> struct pmc_op_pmcallocate *a);

This one is part of the hwpmc(4) kernel module.

> Is the code in the middle of being updated? Which one is correct?

Both are---the kernel and userland use disjoint sets of program
symbols.

Koshy

Reply all
Reply to author
Forward
0 new messages