-int lib_ring_buffer_backend_allocate(const struct lib_ring_buffer_config *config,
- struct lib_ring_buffer_backend *bufb,
+int lib_ring_buffer_backend_allocate(const struct lttng_kernel_ring_buffer_config *config,
+ struct lttng_kernel_ring_buffer_backend *bufb,
- sizeof(struct lib_ring_buffer_backend_pages) +
- sizeof(struct lib_ring_buffer_backend_page)
+ sizeof(struct lttng_kernel_ring_buffer_backend_pages) +
+ sizeof(struct lttng_kernel_ring_buffer_backend_page)
* num_pages_per_subbuf,
1 << INTERNODE_CACHE_SHIFT),
GFP_KERNEL | __GFP_NOWARN,
* num_pages_per_subbuf,
1 << INTERNODE_CACHE_SHIFT),
GFP_KERNEL | __GFP_NOWARN,
* num_subbuf,
1 << INTERNODE_CACHE_SHIFT),
GFP_KERNEL | __GFP_NOWARN,
* num_subbuf,
1 << INTERNODE_CACHE_SHIFT),
GFP_KERNEL | __GFP_NOWARN,
* num_subbuf,
1 << INTERNODE_CACHE_SHIFT),
GFP_KERNEL | __GFP_NOWARN,
* num_subbuf,
1 << INTERNODE_CACHE_SHIFT),
GFP_KERNEL | __GFP_NOWARN,
bufb->cpu = cpu;
return lib_ring_buffer_backend_allocate(config, bufb, chanb->buf_size,
bufb->cpu = cpu;
return lib_ring_buffer_backend_allocate(config, bufb, chanb->buf_size,
{
struct channel_backend *chanb = &bufb->chan->backend;
unsigned long i, j, num_subbuf_alloc;
{
struct channel_backend *chanb = &bufb->chan->backend;
unsigned long i, j, num_subbuf_alloc;
- struct channel *chan = container_of(chanb, struct channel, backend);
- const struct lib_ring_buffer_config *config = &chanb->config;
+ struct lttng_kernel_ring_buffer_channel *chan = container_of(chanb, struct lttng_kernel_ring_buffer_channel, backend);
+ const struct lttng_kernel_ring_buffer_config *config = &chanb->config;
/*
* Don't reset buf_size, subbuf_size, subbuf_size_order,
/*
* Don't reset buf_size, subbuf_size, subbuf_size_order,
{
struct channel_backend *chanb = container_of(node,
struct channel_backend, cpuhp_prepare);
{
struct channel_backend *chanb = container_of(node,
struct channel_backend, cpuhp_prepare);
- const struct lib_ring_buffer_config *config = &chanb->config;
- struct lib_ring_buffer *buf;
+ const struct lttng_kernel_ring_buffer_config *config = &chanb->config;
+ struct lttng_kernel_ring_buffer *buf;
unsigned int cpu = (unsigned long)hcpu;
struct channel_backend *chanb = container_of(nb, struct channel_backend,
cpu_hp_notifier);
unsigned int cpu = (unsigned long)hcpu;
struct channel_backend *chanb = container_of(nb, struct channel_backend,
cpu_hp_notifier);
- const struct lib_ring_buffer_config *config = &chanb->config;
- struct lib_ring_buffer *buf;
+ const struct lttng_kernel_ring_buffer_config *config = &chanb->config;
+ struct lttng_kernel_ring_buffer *buf;
chanb->cpuhp_prepare.component = LTTNG_RING_BUFFER_BACKEND;
ret = cpuhp_state_add_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
if (ret)
goto free_bufs;
chanb->cpuhp_prepare.component = LTTNG_RING_BUFFER_BACKEND;
ret = cpuhp_state_add_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
if (ret)
goto free_bufs;
/*
* Teardown of lttng_rb_hp_prepare instance
* on "add" error is handled within cpu hotplug,
* no teardown to do from the caller.
*/
/*
* Teardown of lttng_rb_hp_prepare instance
* on "add" error is handled within cpu hotplug,
* no teardown to do from the caller.
*/
per_cpu_ptr(chanb->buf, i);
if (!buf->backend.allocated)
per_cpu_ptr(chanb->buf, i);
if (!buf->backend.allocated)
int ret;
ret = cpuhp_state_remove_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
WARN_ON(ret);
int ret;
ret = cpuhp_state_remove_instance(lttng_rb_hp_prepare,
&chanb->cpuhp_prepare.node);
WARN_ON(ret);
CHAN_WARN_ON(chanb, !buf->backend.allocated);
lib_ring_buffer_free(buf);
CHAN_WARN_ON(chanb, !buf->backend.allocated);
lib_ring_buffer_free(buf);
const void *src, size_t len, size_t pagecpy)
{
struct channel_backend *chanb = &bufb->chan->backend;
const void *src, size_t len, size_t pagecpy)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset,
int c, size_t len, size_t pagecpy)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset,
int c, size_t len, size_t pagecpy)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset, const char *src, size_t len,
size_t pagecpy, int pad)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset, const char *src, size_t len,
size_t pagecpy, int pad)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset,
const void __user *src, size_t len,
size_t pagecpy)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset,
const void __user *src, size_t len,
size_t pagecpy)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset, const char __user *src, size_t len,
size_t pagecpy, int pad)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset, const char __user *src, size_t len,
size_t pagecpy, int pad)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset, void __user *dest, size_t len)
{
struct channel_backend *chanb = &bufb->chan->backend;
size_t offset, void __user *dest, size_t len)
{
struct channel_backend *chanb = &bufb->chan->backend;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
* Should be protected by get_subbuf/put_subbuf.
* Destination length should be at least 1 to hold '\0'.
*/
* Should be protected by get_subbuf/put_subbuf.
* Destination length should be at least 1 to hold '\0'.
*/
size_t index;
ssize_t pagecpy, pagelen, strpagelen, orig_offset;
char *str;
size_t index;
ssize_t pagecpy, pagelen, strpagelen, orig_offset;
char *str;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
* Should be protected by get_subbuf/put_subbuf.
* Returns the pointer to the page frame number unsigned long.
*/
* Should be protected by get_subbuf/put_subbuf.
* Returns the pointer to the page frame number unsigned long.
*/
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
* it's always at the beginning of a page, it's safe to write directly to this
* address, as long as the write is never bigger than a page size.
*/
* it's always at the beginning of a page, it's safe to write directly to this
* address, as long as the write is never bigger than a page size.
*/
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;
unsigned long sb_bindex, id;
offset &= chanb->buf_size - 1;