mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-23 20:24:12 +08:00
perf data: Minor code style alignment cleanup
Minor code style alignment cleanup for perf_data__switch() and perf_data__write(). No functional change. Signed-off-by: Yang Jihong <yangjihong1@huawei.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Link: https://lore.kernel.org/r/20240119040304.3708522-4-yangjihong1@huawei.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
02f9b50e04
commit
57c8f1073f
@ -1853,16 +1853,17 @@ record__switch_output(struct record *rec, bool at_exit)
|
||||
}
|
||||
|
||||
fd = perf_data__switch(data, timestamp,
|
||||
rec->session->header.data_offset,
|
||||
at_exit, &new_filename);
|
||||
rec->session->header.data_offset,
|
||||
at_exit, &new_filename);
|
||||
if (fd >= 0 && !at_exit) {
|
||||
rec->bytes_written = 0;
|
||||
rec->session->header.data_size = 0;
|
||||
}
|
||||
|
||||
if (!quiet)
|
||||
if (!quiet) {
|
||||
fprintf(stderr, "[ perf record: Dump %s.%s ]\n",
|
||||
data->path, timestamp);
|
||||
}
|
||||
|
||||
if (rec->switch_output.num_files) {
|
||||
int n = rec->switch_output.cur_file + 1;
|
||||
|
@ -413,7 +413,7 @@ ssize_t perf_data_file__write(struct perf_data_file *file,
|
||||
}
|
||||
|
||||
ssize_t perf_data__write(struct perf_data *data,
|
||||
void *buf, size_t size)
|
||||
void *buf, size_t size)
|
||||
{
|
||||
if (data->use_stdio) {
|
||||
if (fwrite(buf, size, 1, data->file.fptr) == 1)
|
||||
@ -424,9 +424,9 @@ ssize_t perf_data__write(struct perf_data *data,
|
||||
}
|
||||
|
||||
int perf_data__switch(struct perf_data *data,
|
||||
const char *postfix,
|
||||
size_t pos, bool at_exit,
|
||||
char **new_filepath)
|
||||
const char *postfix,
|
||||
size_t pos, bool at_exit,
|
||||
char **new_filepath)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -80,7 +80,7 @@ int perf_data__open(struct perf_data *data);
|
||||
void perf_data__close(struct perf_data *data);
|
||||
ssize_t perf_data__read(struct perf_data *data, void *buf, size_t size);
|
||||
ssize_t perf_data__write(struct perf_data *data,
|
||||
void *buf, size_t size);
|
||||
void *buf, size_t size);
|
||||
ssize_t perf_data_file__write(struct perf_data_file *file,
|
||||
void *buf, size_t size);
|
||||
/*
|
||||
@ -91,8 +91,8 @@ ssize_t perf_data_file__write(struct perf_data_file *file,
|
||||
* Return value is fd of new output.
|
||||
*/
|
||||
int perf_data__switch(struct perf_data *data,
|
||||
const char *postfix,
|
||||
size_t pos, bool at_exit, char **new_filepath);
|
||||
const char *postfix,
|
||||
size_t pos, bool at_exit, char **new_filepath);
|
||||
|
||||
int perf_data__create_dir(struct perf_data *data, int nr);
|
||||
int perf_data__open_dir(struct perf_data *data);
|
||||
|
Loading…
Reference in New Issue
Block a user