question about pmc_name_of_capability

瀏覽次數:0 次
跳到第一則未讀訊息

ajray

未讀,
2009年7月1日 下午1:04:402009/7/1
收件者: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

未讀,
2009年7月1日 晚上9:08:312009/7/1
收件者: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

未讀,
2009年7月2日 上午11:03:542009/7/2
收件者:pmctools...@googlegroups.com

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

Koshy

Joseph Koshy

未讀,
2009年7月2日 上午11:03:542009/7/2
收件者: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

回覆所有人
回覆作者
轉寄
0 則新訊息