mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
ircd::prof::event: Add a use_map ctor option.
This commit is contained in:
parent
c3b6bba288
commit
1e76446919
1 changed files with 5 additions and 3 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue