forked from LLNL/mitos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "Mitos.h" | ||
|
||
static perfsmpl m_perfsmpl; | ||
static mattr m_mattr; | ||
|
||
void Mitos_set_sample_mode(sample_mode m) { m_perfsmpl.set_sample_mode(m); } | ||
void Mitos_set_sample_period(uint64_t p) { m_perfsmpl.set_sample_period(p); } | ||
void Mitos_set_sample_threshold(uint64_t t) { m_perfsmpl.set_sample_threshold(t); } | ||
void Mitos_set_handler(sample_handler_fn_t h) { m_perfsmpl.set_handler(h); } | ||
|
||
void Mitos_prepare() { m_perfsmpl.prepare(); } | ||
void Mitos_prepare(pid_t pid) { m_perfsmpl.prepare(pid); } | ||
void Mitos_begin_sampler() { m_perfsmpl.begin_sampler(); } | ||
void Mitos_end_sampler() { m_perfsmpl.end_sampler(); } | ||
|
||
void Mitos_add_symbol(std::string n, void *a, size_t s, size_t l) { m_mattr.add_symbol(n,a,s,l); } | ||
|
||
mem_symbol* Mitos_find_symbol(uint64_t addr) { return m_mattr.find_symbol(addr); } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include "perfsmpl.h" | ||
#include "mattr.h" | ||
|
||
#include <string> | ||
|
||
/* | ||
* Mitos: performance event sampling library | ||
* All programs must invoke from these functions. | ||
*/ | ||
void Mitos_set_sample_mode(sample_mode m); | ||
void Mitos_set_sample_period(uint64_t p); | ||
void Mitos_set_sample_threshold(uint64_t t); | ||
void Mitos_set_handler(sample_handler_fn_t h); | ||
|
||
void Mitos_prepare(); | ||
void Mitos_prepare(pid_t pid); | ||
void Mitos_begin_sampler(); | ||
void Mitos_end_sampler(); | ||
|
||
void Mitos_add_symbol(std::string n, void *a, size_t s, size_t l); | ||
|
||
mem_symbol* Mitos_find_symbol(uint64_t addr); | ||
|