Adding a new Component

Adding a new Component

Postby Knobi » Wed Sep 02, 2009 7:51 am

Hi all,

I'm currently working on a HDD component for PAPI-C but have some trouble with the PAPI_event_name_to_code routine. I've created the component according to the given ACPI and Ethernet components and adapted the PAPI source files accoring to the wiki.

I've configured PAPI-C with --with-acpi=yes, --with-net=yes and --with-hdd=yes (my component) and it compiled without problems.

A call to PAPI_num_components() gives the correct result of 4 and the even the values of the component_info type returned by PAPI_get_component_info() are as expected.
However, when I try to create an event set and therefore call PAPI_event_name_to_code(), PAPI does not find the event. With events of the other three components it works fine. Does someone have an idea what the reason might be why the event is not found? Did I miss something?

Regards, Michael
Knobi
 
Posts: 3
Joined: Wed Aug 26, 2009 2:32 am

Re: Adding a new Component

Postby jagode00 » Wed Sep 02, 2009 8:55 am

When you call papi_native_avail, does it also list the new events from the HDD component???
If so, try to declare your EventSet with only one of those new HDD events (as shown by papi_native_avail) and then call PAPI_event_name_to_code.
-heik
jagode00
 
Posts: 28
Joined: Tue Aug 25, 2009 2:12 pm

Re: Adding a new Component

Postby Knobi » Wed Sep 02, 2009 9:34 am

Heike,

thanks for the tip with papi_native_avail. That segfaulted in a strncpy when it should come to the HDD events and so I eventually discovered that I forgot the commas between the name and the description string of the events in the native event table. It now seems to work.

Thanks, Michael

P.S. Is there a possibility to commit that component to the PAPI-C CVS when finished?
Knobi
 
Posts: 3
Joined: Wed Aug 26, 2009 2:32 am

Re: Adding a new Component

Postby Dan Terpstra » Mon Sep 28, 2009 2:18 pm

Knobi wrote:P.S. Is there a possibility to commit that component to the PAPI-C CVS when finished?


Apologies for the long delay in responding. We're entering new territory here. We want to encourage people to develop novel, useful and innovative components for PAPI. We also want to provide a mechanism to distribute those components as broadly as possible. However, we're concerned about accepting the burden for testing and maintaining components produced by others as part of the mainline PAPI source tree.

We may be able to set up a separate repository for third party components and we may somehow require components to pass some kind of acceptance testing before being incorporated into the source tree. But this is all new ground to explore.

Maybe this is an opportunity to use something like sourceforge as a clearing house for PAPI Components.

For any of this to work smoothly, we need to develop a mechanism whereby components can be separately compiled and discovered at run-time rather than the clunky inclusion in the build at configure time the way we do things now.

I welcome other ideas on this topic. Any thoughts?
Dan Terpstra
 
Posts: 57
Joined: Mon Aug 24, 2009 5:42 pm


Return to PAPI-C Component Development

Who is online

Users browsing this forum: No registered users and 2 guests