#include <wrapper/vmalloc.h>
#include <wrapper/perf.h>
#include <lttng-tracer.h>
#include <wrapper/vmalloc.h>
#include <wrapper/perf.h>
#include <lttng-tracer.h>
static
void overflow_callback(struct perf_event *event,
struct perf_sample_data *data,
static
void overflow_callback(struct perf_event *event,
struct perf_sample_data *data,
kfree(field->event_field.name);
kfree(field->u.perf_counter->attr);
lttng_kvfree(events);
kfree(field->u.perf_counter);
}
kfree(field->event_field.name);
kfree(field->u.perf_counter->attr);
lttng_kvfree(events);
kfree(field->u.perf_counter);
}
int lttng_cpuhp_perf_counter_online(unsigned int cpu,
struct lttng_cpuhp_node *node)
int lttng_cpuhp_perf_counter_online(unsigned int cpu,
struct lttng_cpuhp_node *node)
perf_field->cpuhp_prepare.component = LTTNG_CONTEXT_PERF_COUNTERS;
ret = cpuhp_state_add_instance(lttng_hp_prepare,
perf_field->cpuhp_prepare.component = LTTNG_CONTEXT_PERF_COUNTERS;
ret = cpuhp_state_add_instance(lttng_hp_prepare,
for_each_online_cpu(cpu) {
events[cpu] = wrapper_perf_event_create_kernel_counter(attr,
cpu, NULL, overflow_callback);
for_each_online_cpu(cpu) {
events[cpu] = wrapper_perf_event_create_kernel_counter(attr,
cpu, NULL, overflow_callback);