X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=lib%2Fringbuffer%2Fconfig.h;h=15259239633810dd0426671c591554c5f1bded47;hb=369708f464bedc0682151df9308cebfa14dbdb2b;hp=b8169afe036b21d954b0781a7bb661ace00ad328;hpb=5671a6610b06175832338ed78db486b59bc5246c;p=lttng-modules.git diff --git a/lib/ringbuffer/config.h b/lib/ringbuffer/config.h index b8169afe..15259239 100644 --- a/lib/ringbuffer/config.h +++ b/lib/ringbuffer/config.h @@ -1,29 +1,16 @@ -#ifndef _LIB_RING_BUFFER_CONFIG_H -#define _LIB_RING_BUFFER_CONFIG_H - -/* +/* SPDX-License-Identifier: (GPL-2.0-only OR LGPL-2.1-only) + * * lib/ringbuffer/config.h * * Ring buffer configuration header. Note: after declaring the standard inline * functions, clients should also include linux/ringbuffer/api.h. * * Copyright (C) 2010-2012 Mathieu Desnoyers - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; only - * version 2.1 of the License. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#ifndef _LIB_RING_BUFFER_CONFIG_H +#define _LIB_RING_BUFFER_CONFIG_H + #include #include #include @@ -48,7 +35,8 @@ struct lib_ring_buffer_client_cb { size_t (*record_header_size) (const struct lib_ring_buffer_config *config, struct channel *chan, size_t offset, size_t *pre_header_padding, - struct lib_ring_buffer_ctx *ctx); + struct lib_ring_buffer_ctx *ctx, + void *client_ctx); /* Slow path only, at subbuffer switch */ size_t (*subbuffer_header_size) (void); @@ -200,6 +188,8 @@ struct lib_ring_buffer_ctx { */ u64 tsc; /* time-stamp counter value */ unsigned int rflags; /* reservation flags */ + /* Cache backend pages pointer chasing. */ + struct lib_ring_buffer_backend_pages *backend_pages; }; /** @@ -223,6 +213,7 @@ void lib_ring_buffer_ctx_init(struct lib_ring_buffer_ctx *ctx, ctx->largest_align = largest_align; ctx->cpu = cpu; ctx->rflags = 0; + ctx->backend_pages = NULL; } /* @@ -310,6 +301,6 @@ int lib_ring_buffer_check_config(const struct lib_ring_buffer_config *config, return 0; } -#include "../../wrapper/ringbuffer/vatomic.h" +#include #endif /* _LIB_RING_BUFFER_CONFIG_H */