0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-06-10 22:18:54 +02:00

ircd::prof::event: Add a use_map ctor option.

This commit is contained in:
Jason Volk 2019-05-08 03:42:59 -07:00
parent c3b6bba288
commit 1e76446919

View file

@ -54,7 +54,8 @@ struct ircd::prof::event
const uint32_t &type,
const uint64_t &config,
const bool &user,
const bool &kernel);
const bool &kernel,
const bool &use_map = true);
~event() noexcept;
};
@ -687,7 +688,8 @@ ircd::prof::event::event(const int &group,
const uint32_t &type,
const uint64_t &config,
const bool &user,
const bool &kernel)
const bool &kernel,
const bool &use_map)
:attr{[&]
{
struct ::perf_event_attr ret {0};
@ -730,7 +732,7 @@ ircd::prof::event::event(const int &group,
}()}
,map_size
{
type == PERF_TYPE_HARDWARE?
use_map && type == PERF_TYPE_HARDWARE?
size_t(1UL + 0UL) * info::page_size:
0UL
}