Re: [PATCH v2 35/87] trace-cmd library: Initialize internal sections database on file read

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 29 Jul 2021 08:09:07 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

>  
> +	if (handle->file_version < 7)
> +		add_section(handle, TRACECMD_OPTION_FTRACE_EVENTS, 0, 0,
> +			    lseek64(handle->fd, 0, SEEK_CUR));
> +

I really hate these "magic number 7"s.

Perhaps we should add flags, like "SECTIONED" with a bit more
meaning.

	if (handle->flags & HANDLE_FL_SECTIONED)
		section_add(...);

-- Steve



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux