HPCToolkit
common.h
Go to the documentation of this file.
1 // -*-Mode: C++;-*- // technically C99
2 
3 // * BeginRiceCopyright *****************************************************
4 //
5 // $HeadURL$
6 // $Id$
7 //
8 // --------------------------------------------------------------------------
9 // Part of HPCToolkit (hpctoolkit.org)
10 //
11 // Information about sources of support for research and development of
12 // HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
13 // --------------------------------------------------------------------------
14 //
15 // Copyright ((c)) 2002-2019, Rice University
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without
19 // modification, are permitted provided that the following conditions are
20 // met:
21 //
22 // * Redistributions of source code must retain the above copyright
23 // notice, this list of conditions and the following disclaimer.
24 //
25 // * Redistributions in binary form must reproduce the above copyright
26 // notice, this list of conditions and the following disclaimer in the
27 // documentation and/or other materials provided with the distribution.
28 //
29 // * Neither the name of Rice University (RICE) nor the names of its
30 // contributors may be used to endorse or promote products derived from
31 // this software without specific prior written permission.
32 //
33 // This software is provided by RICE and contributors "as is" and any
34 // express or implied warranties, including, but not limited to, the
35 // implied warranties of merchantability and fitness for a particular
36 // purpose are disclaimed. In no event shall RICE or contributors be
37 // liable for any direct, indirect, incidental, special, exemplary, or
38 // consequential damages (including, but not limited to, procurement of
39 // substitute goods or services; loss of use, data, or profits; or
40 // business interruption) however caused and on any theory of liability,
41 // whether in contract, strict liability, or tort (including negligence
42 // or otherwise) arising in any way out of the use of this software, even
43 // if advised of the possibility of such damage.
44 //
45 // ******************************************************* EndRiceCopyright *
46 
47 #ifndef COMMON_SAMPLE_SOURCE_H
48 #define COMMON_SAMPLE_SOURCE_H
49 
50 #include "common-method-def.h"
51 
52 #define HPCRUN_PAPI_ERROR_UNAVAIL 1
53 #define HPCRUN_PAPI_ERROR_VERSION 2
54 
55 void METHOD_FN(hpcrun_ss_add_event, const char* ev);
56 void METHOD_FN(hpcrun_ss_store_event, int event_id, long thresh);
57 int METHOD_FN(hpcrun_ss_store_event_and_info, int event_id, long thresh,
58  int metric_id, void *info);
59 void METHOD_FN(hpcrun_ss_store_metric_id, int event_id, int metric_id);
60 char* METHOD_FN(hpcrun_ss_get_event_str);
61 bool METHOD_FN(hpcrun_ss_started);
62 
63 // Interface (NON method) functions
64 
65 int hpcrun_event2metric(sample_source_t* ss, int event_idx);
66 
67 void hpcrun_ssfail_none(void);
68 void hpcrun_ssfail_unknown(char *event);
69 void hpcrun_ssfail_unsupported(char *source, char *event);
70 void hpcrun_ssfail_derived(char *source, char *event);
71 void hpcrun_ssfail_all_derived(char *source);
72 void hpcrun_ssfail_conflict(char *source, char *event);
73 void hpcrun_ssfail_start(char *source);
74 void hpcrun_save_papi_error(int error);
75 
76 #endif // COMMON_SAMPLE_SOURCE_H
void METHOD_FN(hpcrun_ss_add_event, const char *ev)
void hpcrun_save_papi_error(int error)
Definition: common.c:184
void hpcrun_ssfail_all_derived(char *source)
Definition: common.c:246
int hpcrun_event2metric(sample_source_t *ss, int event_idx)
Definition: common.c:143
void hpcrun_ssfail_unknown(char *event)
Definition: common.c:220
void hpcrun_ssfail_start(char *source)
Definition: common.c:265
void hpcrun_ssfail_none(void)
Definition: common.c:209
void hpcrun_ssfail_derived(char *source, char *event)
Definition: common.c:238
void hpcrun_ssfail_conflict(char *source, char *event)
Definition: common.c:255
void hpcrun_ssfail_unsupported(char *source, char *event)
Definition: common.c:230