X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=liblttng-ust%2Fltt-ring-buffer-metadata-client.h;h=acc56fddb890d172b8e2386977df7ce56f501adb;hb=273973c0f59628f3dc242fdf1a41d5f275b290e2;hp=7e79b116fa613a672be0efaeb0a2c1987536c762;hpb=9d335227b11499758dc06d97822ba2ebeeb0fd5c;p=lttng-ust.git diff --git a/liblttng-ust/ltt-ring-buffer-metadata-client.h b/liblttng-ust/ltt-ring-buffer-metadata-client.h index 7e79b116..acc56fdd 100644 --- a/liblttng-ust/ltt-ring-buffer-metadata-client.h +++ b/liblttng-ust/ltt-ring-buffer-metadata-client.h @@ -1,11 +1,23 @@ /* * ltt-ring-buffer-client.h * - * Copyright (C) 2010 - Mathieu Desnoyers - * * LTTng lib ring buffer client template. * - * Dual LGPL v2.1/GPL v2 license. + * 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 */ #include @@ -16,7 +28,7 @@ struct metadata_packet_header { uint32_t magic; /* 0x75D11D57 */ - uint8_t uuid[16]; /* Unique Universal Identifier */ + uint8_t uuid[LTTNG_UST_UUID_LEN]; /* Unique Universal Identifier */ uint32_t checksum; /* 0 if unused */ uint32_t content_size; /* in bits */ uint32_t packet_size; /* in bits */ @@ -119,7 +131,11 @@ static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t ts header->content_size = data_size * CHAR_BIT; /* in bits */ header->packet_size = PAGE_ALIGN(data_size) * CHAR_BIT; /* in bits */ - records_lost += lib_ring_buffer_get_records_lost_full(&client_config, buf); + /* + * We do not care about the records lost count, because the metadata + * channel waits and retry. + */ + (void) lib_ring_buffer_get_records_lost_full(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_wrap(&client_config, buf); records_lost += lib_ring_buffer_get_records_lost_big(&client_config, buf); WARN_ON_ONCE(records_lost != 0);