All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Tzvetomir Stoyanov (VMware)" <tz.stoyanov@gmail.com>
To: rostedt@goodmis.org
Cc: linux-trace-devel@vger.kernel.org
Subject: [PATCH v2 23/87] trace-cmd library: Refactor the logic for writing trace data in the file
Date: Thu, 29 Jul 2021 08:08:55 +0300	[thread overview]
Message-ID: <20210729050959.12263-24-tz.stoyanov@gmail.com> (raw)
In-Reply-To: <20210729050959.12263-1-tz.stoyanov@gmail.com>

When a trace buffer data are written in the trace file, the buffer
option in the file metadata is updated with the file offset of the
tracing data. Hide this logic into the trace-cmd library.
Added new APIs:
 tracecmd_add_buffer_info()
 tracecmd_write_buffer_info()
Changed APIs:
 tracecmd_append_buffer_cpu_data()
Removed APIs:
 tracecmd_add_buffer_option()

Refactored the internal logic of tracecmd_write_cpu_data() API to be
suitable for adding trace data compression. The size and the offset
of the trace data is saved in the file right after the data is written.
The old logic calculates the size and offset in advance, but when the
trace data is compressed it is hard to use that approach.

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
---
 .../include/private/trace-cmd-private.h       |  10 +-
 lib/trace-cmd/include/trace-cmd-local.h       |  16 +
 lib/trace-cmd/trace-output.c                  | 314 ++++++++++++------
 tracecmd/trace-listen.c                       |   2 +-
 tracecmd/trace-record.c                       |  18 +-
 5 files changed, 240 insertions(+), 120 deletions(-)

diff --git a/lib/trace-cmd/include/private/trace-cmd-private.h b/lib/trace-cmd/include/private/trace-cmd-private.h
index b193d6de..4e718c40 100644
--- a/lib/trace-cmd/include/private/trace-cmd-private.h
+++ b/lib/trace-cmd/include/private/trace-cmd-private.h
@@ -305,8 +305,8 @@ struct tracecmd_option *
 tracecmd_add_option_v(struct tracecmd_output *handle,
 		      unsigned short id, const struct iovec *vector, int count);
 
-struct tracecmd_option *tracecmd_add_buffer_option(struct tracecmd_output *handle,
-						   const char *name, int cpus);
+int tracecmd_add_buffer_info(struct tracecmd_output *handle, const char *name, int cpus);
+int tracecmd_write_buffer_info(struct tracecmd_output *handle);
 
 int tracecmd_write_cpus(struct tracecmd_output *handle, int cpus);
 int tracecmd_write_cmdlines(struct tracecmd_output *handle);
@@ -318,13 +318,11 @@ struct tracecmd_output *tracecmd_copy(struct tracecmd_input *ihandle,
 				      const char *file);
 
 int tracecmd_write_cpu_data(struct tracecmd_output *handle,
-			    int cpus, char * const *cpu_data_files);
+			    int cpus, char * const *cpu_data_files, const char *buff_name);
 int tracecmd_append_cpu_data(struct tracecmd_output *handle,
 			     int cpus, char * const *cpu_data_files);
 int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle,
-				    struct tracecmd_option *option,
-				    int cpus, char * const *cpu_data_files);
-
+				    const char *name, int cpus, char * const *cpu_data_files);
 struct tracecmd_output *tracecmd_get_output_handle_fd(int fd);
 unsigned long tracecmd_get_out_file_version(struct tracecmd_output *handle);
 
diff --git a/lib/trace-cmd/include/trace-cmd-local.h b/lib/trace-cmd/include/trace-cmd-local.h
index 2a23d9e0..e54ba7e1 100644
--- a/lib/trace-cmd/include/trace-cmd-local.h
+++ b/lib/trace-cmd/include/trace-cmd-local.h
@@ -24,6 +24,14 @@ void tracecmd_info(const char *fmt, ...);
 #endif
 #endif
 
+struct data_file_write {
+	unsigned long long	file_size;
+	unsigned long long	write_size;
+	unsigned long long	soffset;
+	unsigned long long	data_offset;
+	unsigned long long	doffset;
+};
+
 void tracecmd_compress_init(void);
 void tracecmd_compress_free(void);
 
@@ -47,6 +55,14 @@ out_write_section_header(struct tracecmd_output *handle, unsigned short header_i
 			 char *description, enum tracecmd_section_flags flags, bool option);
 int out_update_section_header(struct tracecmd_output *handle, unsigned long long offset);
 
+struct cpu_data_source {
+	int fd;
+	int size;
+	off64_t offset;
+};
+
+int out_write_cpu_data(struct tracecmd_output *handle, int cpus,
+		       struct cpu_data_source *data, const char *buff_name);
 off64_t msg_lseek(struct tracecmd_msg_handle *msg_handle, off_t offset, int whence);
 
 #endif /* _TRACE_CMD_LOCAL_H */
diff --git a/lib/trace-cmd/trace-output.c b/lib/trace-cmd/trace-output.c
index a5c11eba..6a44a99b 100644
--- a/lib/trace-cmd/trace-output.c
+++ b/lib/trace-cmd/trace-output.c
@@ -39,6 +39,14 @@ struct tracecmd_option {
 	struct list_head list;
 };
 
+struct tracecmd_buffer {
+	int				cpus;
+	void				*name;
+	tsize_t				offset;
+	struct tracecmd_option		*option;
+	struct list_head		list;
+};
+
 enum {
 	OUTPUT_FL_SEND_META	= (1 << 0),
 };
@@ -61,6 +69,7 @@ struct tracecmd_output {
 	struct tracecmd_compression *compress;
 
 	struct list_head	options;
+	struct list_head	buffers;
 	struct tracecmd_msg_handle *msg_handle;
 	char			*trace_clock;
 };
@@ -201,6 +210,7 @@ bool tracecmd_get_quiet(struct tracecmd_output *handle)
 void tracecmd_output_free(struct tracecmd_output *handle)
 {
 	struct tracecmd_option *option;
+	struct tracecmd_buffer *buffer;
 
 	if (!handle)
 		return;
@@ -211,6 +221,13 @@ void tracecmd_output_free(struct tracecmd_output *handle)
 	if (handle->pevent)
 		tep_unref(handle->pevent);
 
+	while (!list_empty(&handle->buffers)) {
+		buffer = container_of(handle->buffers.next,
+				      struct tracecmd_buffer, list);
+		list_del(&buffer->list);
+		free(buffer->name);
+		free(buffer);
+	}
 	while (!list_empty(&handle->options)) {
 		option = container_of(handle->options.next,
 				      struct tracecmd_option, list);
@@ -1158,6 +1175,7 @@ struct tracecmd_output *tracecmd_output_allocate(int fd)
 		handle->big_endian = false;
 
 	list_head_init(&handle->options);
+	list_head_init(&handle->buffers);
 
 	handle->file_state = TRACECMD_FILE_ALLOCATED;
 
@@ -1661,15 +1679,14 @@ int tracecmd_append_options(struct tracecmd_output *handle)
 	return 0;
 }
 
-struct tracecmd_option *
-tracecmd_add_buffer_option(struct tracecmd_output *handle, const char *name,
-			   int cpus)
+static struct tracecmd_option *
+add_buffer_option(struct tracecmd_output *handle, const char *name, int cpus)
 {
 	struct tracecmd_option *option;
 	char *buf;
 	int size = 8 + strlen(name) + 1;
 
-	buf = malloc(size);
+	buf = calloc(1, size);
 	if (!buf) {
 		tracecmd_warning("Failed to malloc buffer");
 		return NULL;
@@ -1691,6 +1708,52 @@ tracecmd_add_buffer_option(struct tracecmd_output *handle, const char *name,
 	return option;
 }
 
+int tracecmd_add_buffer_info(struct tracecmd_output *handle, const char *name, int cpus)
+{
+	struct tracecmd_buffer *buf;
+
+	buf = calloc(1, sizeof(struct tracecmd_buffer));
+	if (!buf)
+		return -1;
+	buf->name = strdup(name);
+	buf->cpus = cpus;
+	if (!buf->name) {
+		free(buf);
+		return -1;
+	}
+	list_add_tail(&buf->list, &handle->buffers);
+	return 0;
+}
+
+int tracecmd_write_buffer_info(struct tracecmd_output *handle)
+{
+	struct tracecmd_option *option;
+	struct tracecmd_buffer *buf;
+
+	list_for_each_entry(buf, &handle->buffers, list) {
+		option = add_buffer_option(handle, buf->name, buf->cpus);
+		if (!option)
+			return -1;
+		buf->option = option;
+	}
+
+	return 0;
+}
+
+static tsize_t get_buffer_file_offset(struct tracecmd_output *handle, const char *name)
+{
+	struct tracecmd_buffer *buf;
+
+	list_for_each_entry(buf, &handle->buffers, list) {
+		if (strlen(name) == strlen(buf->name) && !strcmp(name, buf->name)) {
+			if (!buf->option)
+				break;
+			return buf->option->offset;
+		}
+	}
+	return 0;
+}
+
 int tracecmd_write_cmdlines(struct tracecmd_output *handle)
 {
 	enum tracecmd_section_flags flags = 0;
@@ -1808,6 +1871,37 @@ out:
 	return ret;
 }
 
+static int update_buffer_cpu_offset(struct tracecmd_output *handle,
+				       const char *name, tsize_t offset)
+{
+	tsize_t b_offset;
+	tsize_t current;
+
+	b_offset = get_buffer_file_offset(handle, name);
+	if (!b_offset) {
+		tracecmd_warning("Cannot find description for buffer %s\n", name);
+		return -1;
+	}
+	current = do_lseek(handle, 0, SEEK_CUR);
+
+	/* Go to the option data, where will write the offest */
+	if (do_lseek(handle, b_offset, SEEK_SET) == (off64_t)-1) {
+		tracecmd_warning("could not seek to %lld\n", b_offset);
+		return -1;
+	}
+
+	if (do_write_check(handle, &offset, 8))
+		return -1;
+
+	/* Go back to end of file */
+	if (do_lseek(handle, current, SEEK_SET) == (off64_t)-1) {
+		tracecmd_warning("could not seek to %lld\n", offset);
+		return -1;
+	}
+	return 0;
+}
+
+
 static char *get_clock(struct tracecmd_output *handle)
 {
 	struct tracefs_instance *inst;
@@ -1827,120 +1921,158 @@ static char *get_clock(struct tracecmd_output *handle)
 	return handle->trace_clock;
 }
 
-int tracecmd_write_cpu_data(struct tracecmd_output *handle,
-			    int cpus, char * const *cpu_data_files)
+
+__hidden int out_write_cpu_data(struct tracecmd_output *handle,
+				int cpus, struct cpu_data_source *data, const char *buff_name)
 {
-	off64_t *offsets = NULL;
-	unsigned long long *sizes = NULL;
-	off64_t offset;
+	struct data_file_write *data_files = NULL;
+	tsize_t data_offs, offset;
 	unsigned long long endian8;
-	char *clock = NULL;
-	off64_t check_size;
-	char *file;
-	struct stat st;
+	unsigned long long read_size;
+	char *clock;
 	int ret;
 	int i;
 
 	/* This can be called multiple times (when recording instances) */
 	ret = handle->file_state == TRACECMD_FILE_CPU_FLYRECORD ? 0 :
-		check_out_state(handle, TRACECMD_FILE_CPU_FLYRECORD);
+				    check_file_state(handle->file_version,
+						     handle->file_state,
+						     TRACECMD_FILE_CPU_FLYRECORD);
 	if (ret < 0) {
 		tracecmd_warning("Cannot write trace data into the file, unexpected state 0x%X",
 				 handle->file_state);
 		goto out_free;
 	}
 
+	data_offs = do_lseek(handle, 0, SEEK_CUR);
 	if (do_write_check(handle, "flyrecord", 10))
 		goto out_free;
 
-	offsets = malloc(sizeof(*offsets) * cpus);
-	if (!offsets)
+	data_files = calloc(cpus, sizeof(struct data_file_write));
+	if (!data_files)
 		goto out_free;
-	sizes = malloc(sizeof(*sizes) * cpus);
-	if (!sizes)
-		goto out_free;
-
-	offset = lseek64(handle->fd, 0, SEEK_CUR);
 
-	/* hold any extra data for data */
-	offset += cpus * (16);
+	for (i = 0; i < cpus; i++) {
+		data_files[i].file_size = data[i].size;
+		/* Write 0 for trace data offset and size and store offsets of these fields */
+		if (handle->file_version < 7) {
+			endian8 = 0;
+			data_files[i].doffset = do_lseek(handle, 0, SEEK_CUR);
+			if (do_write_check(handle, &endian8, 8))
+				goto out_free;
+			data_files[i].soffset = do_lseek(handle, 0, SEEK_CUR);
+			if (do_write_check(handle, &endian8, 8))
+				goto out_free;
+		}
+	}
 
-	/*
-	 * Unfortunately, the trace_clock data was placed after the
-	 * cpu data, and wasn't accounted for with the offsets.
-	 * We need to save room for the trace_clock file. This means
-	 * we need to find the size of it before we define the final
-	 * offsets.
-	 */
+	update_buffer_cpu_offset(handle, buff_name, data_offs);
 	clock = get_clock(handle);
-	if (!clock)
+	if (clock && save_clock(handle, clock))
 		goto out_free;
-	/* Save room for storing the size */
-	offset += 8;
-	offset += strlen(clock);
-	/* 2 bytes for [] around the clock */
-	offset += 2;
-
-	/* Page align offset */
-	offset = (offset + (handle->page_size - 1)) & ~(handle->page_size - 1);
 
 	for (i = 0; i < cpus; i++) {
-		file = cpu_data_files[i];
-		ret = stat(file, &st);
-		if (ret < 0) {
-			tracecmd_warning("can not stat '%s'", file);
+		data_files[i].data_offset = do_lseek(handle, 0, SEEK_CUR);
+		/* Page align offset */
+		data_files[i].data_offset = (data_files[i].data_offset + (handle->page_size - 1)) & ~(handle->page_size - 1);
+		data_files[i].data_offset = do_lseek(handle, data_files[i].data_offset, SEEK_SET);
+		if (data_files[i].data_offset == (off64_t)-1)
+			goto out_free;
+		if (!tracecmd_get_quiet(handle))
+			fprintf(stderr, "CPU%d data recorded at offset=0x%llx\n",
+				i, (unsigned long long) data_files[i].data_offset);
+		if (lseek64(data[i].fd, data[i].offset, SEEK_SET) == (off64_t)-1)
 			goto out_free;
+		if (data[i].size) {
+			read_size = copy_file_fd(handle, data[i].fd);
+			if (read_size != data_files[i].file_size) {
+				errno = EINVAL;
+				tracecmd_warning("did not match size of %lld to %lld",
+						 read_size, data_files[i].file_size);
+				goto out_free;
+			}
+		} else {
+			data_files[i].write_size = 0;
 		}
-		offsets[i] = offset;
-		sizes[i] = st.st_size;
-		offset += st.st_size;
-		offset = (offset + (handle->page_size - 1)) & ~(handle->page_size - 1);
 
-		endian8 = convert_endian_8(handle, offsets[i]);
-		if (do_write_check(handle, &endian8, 8))
+		/* Write the real CPU data offset in the file */
+		if (do_lseek(handle, data_files[i].doffset, SEEK_SET) == (off64_t)-1)
 			goto out_free;
-		endian8 = convert_endian_8(handle, sizes[i]);
+		endian8 = convert_endian_8(handle, data_files[i].data_offset);
 		if (do_write_check(handle, &endian8, 8))
 			goto out_free;
-	}
-
-	if (save_clock(handle, clock))
-		goto out_free;
-
-	for (i = 0; i < cpus; i++) {
-		if (!tracecmd_get_quiet(handle))
-			fprintf(stderr, "CPU%d data recorded at offset=0x%llx\n",
-				i, (unsigned long long) offsets[i]);
-		offset = lseek64(handle->fd, offsets[i], SEEK_SET);
-		if (offset == (off64_t)-1) {
-			tracecmd_warning("could not seek to %lld\n", offsets[i]);
+		/* Write the real CPU data size in the file */
+		if (do_lseek(handle, data_files[i].soffset, SEEK_SET) == (off64_t)-1)
 			goto out_free;
-		}
-		check_size = copy_file(handle, cpu_data_files[i]);
-		if (check_size != sizes[i]) {
-			errno = EINVAL;
-			tracecmd_warning("did not match size of %lld to %lld",
-					 check_size, sizes[i]);
+		endian8 = convert_endian_8(handle, data_files[i].write_size);
+		if (do_write_check(handle, &endian8, 8))
+			goto out_free;
+		offset = data_files[i].data_offset + data_files[i].write_size;
+		if (do_lseek(handle, offset, SEEK_SET) == (off64_t)-1)
 			goto out_free;
-		}
 		if (!tracecmd_get_quiet(handle))
 			fprintf(stderr, "    %llu bytes in size\n",
-				(unsigned long long)check_size);
+				(unsigned long long)data_files[i].write_size);
 	}
 
-	free(offsets);
-	free(sizes);
+	if (do_lseek(handle, 0, SEEK_END) == (off64_t)-1)
+		goto out_free;
 
+	free(data_files);
 	handle->file_state = TRACECMD_FILE_CPU_FLYRECORD;
 
 	return 0;
 
  out_free:
-	free(offsets);
-	free(sizes);
+	do_lseek(handle, 0, SEEK_END);
+	free(data_files);
 	return -1;
 }
 
+int tracecmd_write_cpu_data(struct tracecmd_output *handle,
+			    int cpus, char * const *cpu_data_files, const char *buff_name)
+{
+	struct cpu_data_source *data;
+	struct stat st;
+	int size = 0;
+	int ret;
+	int i;
+
+	data = calloc(cpus, sizeof(struct cpu_data_source));
+	if (!data)
+		return -1;
+	for (i = 0; i < cpus; i++)
+		data[i].fd = -1;
+	for (i = 0; i < cpus; i++) {
+		ret = stat(cpu_data_files[i], &st);
+		if (ret < 0) {
+			tracecmd_warning("can not stat '%s'", cpu_data_files[i]);
+			break;
+		}
+		data[i].fd = open(cpu_data_files[i], O_RDONLY);
+		if (data[i].fd < 0) {
+			tracecmd_warning("Can't read '%s'", data[i].fd);
+			break;
+		}
+
+		data[i].size = st.st_size;
+		data[i].offset = 0;
+		size += st.st_size;
+	}
+
+	if (i < cpus)
+		ret = -1;
+	else
+		ret = out_write_cpu_data(handle, cpus, data, buff_name);
+
+	for (i = 0; i < cpus; i++) {
+		if (data[i].fd >= 0)
+			close(data[i].fd);
+	}
+	free(data);
+	return ret;
+}
+
 int tracecmd_append_cpu_data(struct tracecmd_output *handle,
 			     int cpus, char * const *cpu_data_files)
 {
@@ -1949,41 +2081,20 @@ int tracecmd_append_cpu_data(struct tracecmd_output *handle,
 	ret = tracecmd_write_cpus(handle, cpus);
 	if (ret)
 		return ret;
-
+	ret = tracecmd_write_buffer_info(handle);
+	if (ret)
+		return ret;
 	ret = tracecmd_write_options(handle);
 	if (ret)
 		return ret;
 
-	return tracecmd_write_cpu_data(handle, cpus, cpu_data_files);
+	return tracecmd_write_cpu_data(handle, cpus, cpu_data_files, "");
 }
 
 int tracecmd_append_buffer_cpu_data(struct tracecmd_output *handle,
-				    struct tracecmd_option *option,
-				    int cpus, char * const *cpu_data_files)
+				    const char *name, int cpus, char * const *cpu_data_files)
 {
-	tsize_t offset;
-	stsize_t ret;
-
-	offset = lseek64(handle->fd, 0, SEEK_CUR);
-
-	/* Go to the option data, where will write the offest */
-	ret = lseek64(handle->fd, option->offset, SEEK_SET);
-	if (ret == (off64_t)-1) {
-		tracecmd_warning("could not seek to %lld\n", option->offset);
-		return -1;
-	}
-
-	if (do_write_check(handle, &offset, 8))
-		return -1;
-
-	/* Go back to end of file */
-	ret = lseek64(handle->fd, offset, SEEK_SET);
-	if (ret == (off64_t)-1) {
-		tracecmd_warning("could not seek to %lld\n", offset);
-		return -1;
-	}
-
-	return tracecmd_write_cpu_data(handle, cpus, cpu_data_files);
+	return tracecmd_write_cpu_data(handle, cpus, cpu_data_files, name);
 }
 
 struct tracecmd_output *tracecmd_get_output_handle_fd(int fd)
@@ -2029,6 +2140,7 @@ struct tracecmd_output *tracecmd_get_output_handle_fd(int fd)
 	handle->file_version = tracecmd_get_in_file_version(ihandle);
 	handle->options_start = tracecmd_get_options_offset(ihandle);
 	list_head_init(&handle->options);
+	list_head_init(&handle->buffers);
 
 	if (!tracecmd_get_file_compress_proto(ihandle, &cname, &cver)) {
 		handle->compress = tracecmd_compress_alloc(cname, cver, handle->fd,
diff --git a/tracecmd/trace-listen.c b/tracecmd/trace-listen.c
index 0cb70b7d..d812145b 100644
--- a/tracecmd/trace-listen.c
+++ b/tracecmd/trace-listen.c
@@ -610,7 +610,7 @@ static int put_together_file(int cpus, int ofd, const char *node,
 		if (ret)
 			goto out;
 	}
-	ret = tracecmd_write_cpu_data(handle, cpus, temp_files);
+	ret = tracecmd_write_cpu_data(handle, cpus, temp_files, "");
 
 out:
 	tracecmd_output_close(handle);
diff --git a/tracecmd/trace-record.c b/tracecmd/trace-record.c
index 295fe633..350d2811 100644
--- a/tracecmd/trace-record.c
+++ b/tracecmd/trace-record.c
@@ -4187,7 +4187,6 @@ static void touch_file(const char *file)
 }
 
 static void append_buffer(struct tracecmd_output *handle,
-			  struct tracecmd_option *buffer_option,
 			  struct buffer_instance *instance,
 			  char **temp_files)
 {
@@ -4215,7 +4214,7 @@ static void append_buffer(struct tracecmd_output *handle,
 			touch_file(temp_files[i]);
 	}
 
-	tracecmd_append_buffer_cpu_data(handle, buffer_option,
+	tracecmd_append_buffer_cpu_data(handle, tracefs_instance_get_name(instance->tracefs),
 					cpu_count, temp_files);
 
 	for (i = 0; i < instance->cpu_count; i++) {
@@ -4465,7 +4464,7 @@ static void write_guest_file(struct buffer_instance *instance)
 			die("failed to allocate memory");
 	}
 
-	if (tracecmd_write_cpu_data(handle, cpu_count, temp_files) < 0)
+	if (tracecmd_write_cpu_data(handle, cpu_count, temp_files, "") < 0)
 		die("failed to write CPU data");
 	tracecmd_output_close(handle);
 
@@ -4508,7 +4507,6 @@ error:
 
 static void record_data(struct common_record_context *ctx)
 {
-	struct tracecmd_option **buffer_options;
 	struct tracecmd_output *handle;
 	struct buffer_instance *instance;
 	bool local = false;
@@ -4578,9 +4576,6 @@ static void record_data(struct common_record_context *ctx)
 		}
 
 		if (buffers) {
-			buffer_options = malloc(sizeof(*buffer_options) * buffers);
-			if (!buffer_options)
-				die("Failed to allocate buffer options");
 			i = 0;
 			for_each_instance(instance) {
 				int cpus = instance->cpu_count != local_cpu_count ?
@@ -4588,10 +4583,9 @@ static void record_data(struct common_record_context *ctx)
 
 				if (instance->msg_handle)
 					continue;
-
-				buffer_options[i++] = tracecmd_add_buffer_option(handle,
-										 tracefs_instance_get_name(instance->tracefs),
-										 cpus);
+				tracecmd_add_buffer_info(handle,
+							tracefs_instance_get_name(instance->tracefs),
+							cpus);
 				add_buffer_stat(handle, instance);
 			}
 		}
@@ -4626,7 +4620,7 @@ static void record_data(struct common_record_context *ctx)
 				if (instance->msg_handle)
 					continue;
 				print_stat(instance);
-				append_buffer(handle, buffer_options[i++], instance, temp_files);
+				append_buffer(handle, instance, temp_files);
 			}
 		}
 
-- 
2.31.1


  parent reply	other threads:[~2021-07-29  5:10 UTC|newest]

Thread overview: 118+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-29  5:08 [PATCH v2 00/87] Trace file version 7 Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 01/87] trace-cmd library: Read option id with correct endian Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 02/87] trace-cmd report: Fix typos in error messages Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 03/87] tarce-cmd library: Fix version string memory leak Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 04/87] trace-cmd library: Fixed a memory leak on input handler close Tzvetomir Stoyanov (VMware)
2021-07-29 19:36   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 05/87] trace-cmd library: Fix possible memory corruption on processing a trace buffer Tzvetomir Stoyanov (VMware)
2021-07-29 19:39   ` Steven Rostedt
2021-07-29 19:52   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 06/87] trace-cmd library: Add constructor and destructor Tzvetomir Stoyanov (VMware)
2021-07-29 20:06   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 07/87] trace-cmd library: Add cache functionality to network message handler Tzvetomir Stoyanov (VMware)
2021-07-29 20:33   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 08/87] trace-cmd library: Add support for compression algorithms Tzvetomir Stoyanov (VMware)
2021-07-29 21:02   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 09/87] trace-cmd list: Show supported " Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 10/87] trace-cmd library: Internal helpers for compressing data Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 11/87] trace-cmd library: Internal helpers for uncompressing data Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 12/87] trace-cmd library: Define trace file version 7 Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 13/87] trace-cmd library: Refactor APIs for creating output handler Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 14/87] trace-cmd library: Reuse within the library the function that checks file state Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 15/87] trace-cmd library: New API to get the version of output handler Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 16/87] trace-cmd library: Inherit compression algorithm from input file Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 17/87] trace-cmd library: New API to configure compression on an output handler Tzvetomir Stoyanov (VMware)
2021-08-05 21:15   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 18/87] trace-cmd record: Add compression to the trace context Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 19/87] trace-cmd library: Write compression header in the trace file Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 20/87] trace-cmd library: Compress part of " Tzvetomir Stoyanov (VMware)
2021-08-05 21:27   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 21/87] trace-cmd library: Add internal helper functon for writing headers before file sections Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 22/87] trace-cmd library: Write header " Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` Tzvetomir Stoyanov (VMware) [this message]
2021-07-29  5:08 ` [PATCH v2 24/87] trace-cmd library: Add local helper function for data compression Tzvetomir Stoyanov (VMware)
2021-08-17 14:53   ` Steven Rostedt
2021-07-29  5:08 ` [PATCH v2 25/87] trace-cmd library: Compress the trace data Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 26/87] tarce-cmd library: Add multiple options sections in trace file version 7 Tzvetomir Stoyanov (VMware)
2021-07-29  5:08 ` [PATCH v2 27/87] trace-cmd library: Do not write CPU count section in trace files " Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 28/87] trace-cmd library: Move CPU flyrecord trace metadata into the buffer option, for trace file " Tzvetomir Stoyanov (VMware)
2021-08-17 15:40   ` Steven Rostedt
2021-09-02 13:20     ` Tzvetomir Stoyanov
2021-07-29  5:09 ` [PATCH v2 29/87] trace-cmd record: Append trace options after the trace data are written Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 30/87] trace-cmd library: Add section header before flyrecord trace data Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 31/87] trace-cmd library: Fit CPU latency trace data in the new trace file version 7 format Tzvetomir Stoyanov (VMware)
2021-08-17 15:44   ` Steven Rostedt
2021-09-02 12:48     ` Tzvetomir Stoyanov
2021-08-19 19:10   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 32/87] trace-cmd library: Do not write CPUs with empty trace data Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 33/87] trace-cmd library: Add macro to check file state on reading Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 34/87] trace-cmd library: Introduce sections in trace file reading logic Tzvetomir Stoyanov (VMware)
2021-08-19 17:53   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 35/87] trace-cmd library: Initialize internal sections database on file read Tzvetomir Stoyanov (VMware)
2021-08-19 17:57   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 36/87] trace-cmd library: Use sections database when reading parts of the trace file Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 37/87] trace-cmd library: Set log size to the input tep handler when it is read from the file Tzvetomir Stoyanov (VMware)
2021-08-19 18:01   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 38/87] trace-cmd library: Fix possible memory leak in read_ftrace_files() Tzvetomir Stoyanov (VMware)
2021-08-19 18:07   ` Steven Rostedt
2021-08-19 18:08   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 39/87] trace-cmd library: Fix possible memory leak in read_event_files() Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 40/87] trace-cmd library: Fix possible memory leak in read_proc_kallsyms() Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 41/87] trace-cmd library: Fix possible memory leak in read_ftrace_printk() Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 42/87] trace-cmd library: Fix possible memory leak in read_and_parse_cmdlines() Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 43/87] trace-cmd library: Track maximum CPUs count in input handler Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 44/87] trace-cmd library: Set input handler default values in allocation function Tzvetomir Stoyanov (VMware)
2021-08-19 18:11   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 45/87] trace-cmd library: Read headers from trace file version 7 Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 46/87] tarce-cmd library: Do not use local variables when reading CPU stat option Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 47/87] trace-cmd library: Read handle header and compression of the option section Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 48/87] trace-cmd library: Read extended BUFFER option Tzvetomir Stoyanov (VMware)
2021-08-19 18:54   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 49/87] trace-cmd library: Handle the extended DONE option Tzvetomir Stoyanov (VMware)
2021-08-19 19:13   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 50/87] trace-cmd library: Read compression header Tzvetomir Stoyanov (VMware)
2021-08-19 19:15   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 51/87] trace-cmd library: Extend the input handler with trace data decompression context Tzvetomir Stoyanov (VMware)
2021-08-19 19:18   ` Steven Rostedt
2021-09-02 12:46     ` Tzvetomir Stoyanov
2021-07-29  5:09 ` [PATCH v2 52/87] trace-cmd library: Initialize CPU data decompression logic Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 53/87] trace-cmd library: Initialize CPU data for reading from version 7 trace files Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 54/87] trace-cmd library: Add logic for in-memory decompression Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 55/87] trace-cmd library: Handle latency trace in version 7 files Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 56/87] trace-cmd library: Handle buffer trace data init for " Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 57/87] trace-cmd report: Use the new latency API to read data Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 58/87] trace-cmd report: Close input file handlers on exit Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 59/87] trace-cmd report: Do not print empty buffer name Tzvetomir Stoyanov (VMware)
2021-08-19 19:21   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 60/87] trace-cmd report: Init the top trace instance earlier Tzvetomir Stoyanov (VMware)
2021-08-19 19:22   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 61/87] trace-cmd: Call additional APIs when creating trace file Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 62/87] trace-cmd dump: Add helpers for processing trace file version 7 Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 63/87] trace-cmd dump: Print compression header Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 64/87] trace-cmd dump: Add helpers for processing trace file sections Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 65/87] trace-cmd dump: Read recursively all options sections Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 66/87] trace-cmd dump: Read extended BUFFER option Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 67/87] trace-cmd dump: Dump sections Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 68/87] trace-cmd dump: Dump trace file version 7 Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 69/87] trace-cmd dump: Dump sections content Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 70/87] trace-cmd dump: Add new argument --sections Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 71/87] trace-cmd dump: Align better the output of flyrecord dump Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 72/87] trace-cmd library: Add zlib compression algorithm Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 73/87] trace-cmd library: Reuse local function that writes to output handler Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 74/87] trace-cmd library: Use output handler when copying data from input file Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 75/87] trace-cmd library: Handle version 7 files when copying headers between files Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 76/87] tarce-cmd library: Copy CPU count between trace files Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 77/87] tarce-cmd library: New API to copy buffer description " Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 78/87] tarce-cmd library: New API to copy options " Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 79/87] tarce-cmd library: New API to copy trace data " Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 80/87] trace-cmd library: Extend tracecmd_copy() API Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 81/87] trace-cmd library: Set correct CPU to the record, retrieved with tracecmd_peek_data Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 82/87] trace-cmd: Add new subcommand "convert" Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 83/87] trace-cmd report: Add new parameters for version 7 trace files Tzvetomir Stoyanov (VMware)
2021-08-19 19:26   ` Steven Rostedt
2021-07-29  5:09 ` [PATCH v2 84/87] trace-cmd: Update bash completion Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 85/87] tarce-cmd: Man page for "trace-cmd convert" Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 86/87] tarce-cmd: Update record man page Tzvetomir Stoyanov (VMware)
2021-07-29  5:09 ` [PATCH v2 87/87] trace-cmd: Document trace file version 7 Tzvetomir Stoyanov (VMware)
2021-08-19 19:33   ` Steven Rostedt
2021-09-02 13:07     ` Tzvetomir Stoyanov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210729050959.12263-24-tz.stoyanov@gmail.com \
    --to=tz.stoyanov@gmail.com \
    --cc=linux-trace-devel@vger.kernel.org \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.