Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
0c58d55fcd
!59 [sync] PR-52: iolog: fix disk stats issue
From: @openeuler-sync-bot 
Reviewed-by: @wk333 
Signed-off-by: @wk333
2024-05-28 01:15:42 +00:00
cenhuilin
78b2cdf219 fix disk stats issue
(cherry picked from commit 065d8f23c0f41ca162bf07e2a8c4a38cad066966)
2024-05-27 17:40:17 +08:00
openeuler-ci-bot
1827cf3eb6
!55 [sync] PR-40: 【轻量级 PR】:Add BuildRequires gperftools-devel to link tcmalloc
From: @openeuler-sync-bot 
Reviewed-by: @wk333 
Signed-off-by: @wk333
2024-05-27 09:38:28 +00:00
wxm
c952b6ee1b Add BuildRequires gperftools-devel to link tcmalloc
Signed-off-by: wxm <wangxiaomeng@kylinos.cn>
(cherry picked from commit ae55094c029d2d76f414fb17e313195feb93fbac)
2024-05-27 17:37:33 +08:00
openeuler-ci-bot
525163b449
!35 [sync] PR-31: 使用条件编译控制对Ceph rbd的依赖
From: @openeuler-sync-bot 
Reviewed-by: @caodongxia 
Signed-off-by: @caodongxia
2023-03-31 06:05:23 +00:00
Qiang Wei
390d4de896 Make Ceph rbd support optional
Signed-off-by: Qiang Wei <qiang.wei@suse.com>
(cherry picked from commit c428a6f4835b983933d2554c75f8554f67a3fb8a)
2023-03-31 10:35:24 +08:00
openeuler-ci-bot
aa71f38225
!24 Update to 3.29
Merge pull request !24 from caodongxia/openEuler-22.03-LTS-Next
2022-01-17 03:49:24 +00:00
caodongxia
3c392f3439 update to 3.29 2022-01-14 16:06:41 +08:00
openeuler-ci-bot
23ecac082b !23 fix failure caused by GCC upgrade to 10
From: @Lin__Jiaxin
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2021-08-04 02:51:56 +00:00
linjiaxin
8f5dd7bad0 fix build error due to gcc 10
error:
gcc -Wl,-z,relro   -Wl,-z,now -specs=/usr/lib/rpm/generic-hardened-ld -rdynamic -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement -g -ffast-math -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/generic-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -D_GNU_SOURCE -include config-host.h -march=armv8-a+crc+crypto -I. -I. -DBITS_PER_LONG=64 -DFIO_VERSION='"fio-3.7"' -o t/fio-dedupe t/dedupe.o lib/rbtree.o t/log.o fio_sem.o pshared.o smalloc.o gettime.o crc/md5.o lib/memalign.o lib/bloom.o t/debug.o crc/xxhash.o t/arch.o crc/murmur3.o crc/crc32c.o crc/crc32c-intel.o crc/crc32c-arm64.o crc/fnv.o -lrbd -lrados -lrados -lnuma -lrdmacm -libverbs -lrt -laio -lz  -lm  -lpthread -ldl
/usr/bin/ld: t/arch.o:/home/abuild/rpmbuild/BUILD/fio-3.7/t/arch.c:4: multiple definition of `tsc_reliable'; gettime.o:/home/abuild/rpmbuild/BUILD/fio-3.7/gettime.c:25: first defined here
2021-08-03 21:15:22 +08:00
7 changed files with 72 additions and 442 deletions

View File

@ -0,0 +1,31 @@
From c492cb1a9b1c327e985c89eb517d58bd5323880c Mon Sep 17 00:00:00 2001
From: Yong Gang <yygcode@gmail.com>
Date: Mon, 27 May 2024 11:15:56 +0800
Subject: [PATCH] iolog: fix disk stats issue
In the iolog replay scenario, the disk util in the td structure is
not initialized, resulting in the disk stats not being correctly
updated.
Fixes: #1735
Signed-off-by: Yong Gang <yygcode@gmail.com>
---
iolog.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/iolog.c b/iolog.c
index 1aeb7a7..8314787 100644
--- a/iolog.c
+++ b/iolog.c
@@ -722,6 +722,8 @@ bool init_iolog(struct thread_data *td)
if (!ret)
td_verror(td, EINVAL, "failed initializing iolog");
+ init_disk_util(td);
+
return ret;
}
--
2.33.0

View File

@ -1,69 +0,0 @@
From 6cc4a4d2593150cf9ae0f37084b3c583a2ab7e6a Mon Sep 17 00:00:00 2001
From: root <root@localhost.localdomain>
Date: Sat, 19 Sep 2020 10:43:41 +0800
Subject: [PATCH] c
diff --git a/fio_jsonplus_clat2csv b/fio_jsonplus_clat2csv
index 78a007e..a23e799 100755
--- a/tools/fio_jsonplus_clat2csv
+++ b/tools/fio_jsonplus_clat2csv
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
# Note: this script is python2 and python3 compatible.
#
# fio_jsonplus_clat2csv
diff --git a/tools/fiologparser.py b/tools/fiologparser.py
index cc29f1c..49f2639 100755
--- a/tools/fiologparser.py
+++ b/tools/fiologparser.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
# Note: this script is python2 and python 3 compatible.
#
# fiologparser.py
diff --git a/tools/hist/fiologparser_hist.py b/tools/hist/fiologparser_hist.py
index 8910d5f..9b64fe7 100755
--- a/tools/hist/fiologparser_hist.py
+++ b/tools/hist/fiologparser_hist.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
"""
Utility for converting *_clat_hist* files generated by fio into latency statistics.
diff --git a/tools/hist/half-bins.py b/tools/hist/half-bins.py
index 1bba8ff..e5a1418 100755
--- a/tools/hist/half-bins.py
+++ b/tools/hist/half-bins.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
""" Cut the number bins in half in fio histogram output. Example usage:
$ half-bins.py -c 2 output_clat_hist.1.log > smaller_clat_hist.1.log
diff --git a/tools/plot/fio2gnuplot b/tools/plot/fio2gnuplot
index 4d1815c..28b9952 100755
--- a/tools/plot/fio2gnuplot
+++ b/tools/plot/fio2gnuplot
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
# Note: this script is python2 and python3 compatible.
#
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com>
diff --git a/unit_tests/steadystate_tests.py b/unit_tests/steadystate_tests.py
index 50254dc..25008d0 100755
--- a/unit_tests/steadystate_tests.py
+++ b/unit_tests/steadystate_tests.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python2.7
+#!/usr/bin/python3
# Note: this script is python2 and python 3 compatible.
#
# steadystate_tests.py
--
2.27.0

BIN
fio-3.29.tar.bz2 Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,18 +1,28 @@
# Whether to support Ceph rbd storage
%bcond_without rbd
Name: fio
Version: 3.7
Release: 10
Version: 3.29
Release: 4
Summary: Versatile IO workload generator
License: GPLv2
URL: http://git.kernel.dk/?p=fio.git;a=summary
Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2
BuildRequires: libaio-devel zlib-devel librbd1-devel numactl-devel librdmacm-devel gcc
#https://github.com/axboe/fio/pull/1736
Patch0001: 0001-fix-disk-stats-issue.patch
BuildRequires: libaio-devel python3-devel zlib-devel numactl-devel librdmacm-devel gcc
%ifnarch s390
BuildRequires: gperftools-devel
%endif
%if %{with rbd}
BuildRequires: librbd1-devel
%endif
%ifarch x86_64
BuildRequires: libpmem-devel libpmemblk-devel
%endif
Patch0000: fix-glibc-error.patch
Patch0001: Modify-python2.7-to-python3-with-requires.patch
Patch0002: fio2gnuplot-fix-TabErrors-when-running-with-Python-3.patch
%description
fio is a tool used to spawn many threads or processes that perform a specific type
of io operation specified by the user.It accepts many global parameters inherited
@ -27,8 +37,17 @@ Help document for the fio.
%prep
%autosetup -p1
pathfix.py -i %{__python3} -pn \
tools/fio_jsonplus_clat2csv \
tools/fiologparser.py \
tools/hist/*.py \
tools/plot/fio2gnuplot \
t/steadystate_tests.py
%build
./configure --disable-optimizations
./configure --disable-optimizations \
%{!?with_rbd:--disable-rbd}
export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%make_build V=1
@ -46,6 +65,21 @@ export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS"
%{_mandir}/man1/*
%changelog
* Mon May 27 2024 cenhuilin <cenhuilin@kylinos.cn> - 3.29-4
- iolog: fix disk stats issue
* Tue Mar 5 2024 wangxiaomeng <wangxiaomeng@klinos.cn> - 3.29-3
- Add BuildRequires gperftools-devel to link tcmalloc.
* Tue Dec 6 2022 Qiang Wei <qiang.wei@suse.com> - 3.29-2
- Make Ceph rbd support an optional feature.
* Fri Jan 14 2022 caodongxia <caodongxia@huawei.com> - 3.29-1
- Upgrade 3.29
* Fri Jul 30 2021 linjiaxin5 <linjiaxin5@huawei.com> - 3.7-11
- Fix failure caused by GCC upgrade to 10
* Wed Jul 21 2021 lingsheng <lingsheng@huawei.com> - 3.7-10
- Remove unnecessary buildrequire gdb

View File

@ -1,322 +0,0 @@
From 4cbe3909942e913f3a71113bf4036824fcb54953 Mon Sep 17 00:00:00 2001
From: Alexander Kapshuna <kapsh@kap.sh>
Date: Sat, 27 Jul 2019 18:45:32 +0300
Subject: [PATCH] fio2gnuplot: fix TabErrors when running with Python 3
Closes #804
Signed-off-by: Alexander Kapshuna <kapsh@kap.sh>
---
tools/plot/fio2gnuplot | 234 ++++++++++++++++++++---------------------
1 file changed, 117 insertions(+), 117 deletions(-)
diff --git a/tools/plot/fio2gnuplot b/tools/plot/fio2gnuplot
index 4d1815cf8..cc4ea4c74 100755
--- a/tools/plot/fio2gnuplot
+++ b/tools/plot/fio2gnuplot
@@ -36,10 +36,10 @@ def find_file(path, pattern):
fio_data_file=[]
# For all the local files
for file in os.listdir(path):
- # If the file matches the glob
- if fnmatch.fnmatch(file, pattern):
- # Let's consider this file
- fio_data_file.append(file)
+ # If the file matches the glob
+ if fnmatch.fnmatch(file, pattern):
+ # Let's consider this file
+ fio_data_file.append(file)
return fio_data_file
@@ -51,7 +51,7 @@ def generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,gnuplot_
# Plotting 3D or comparing graphs doesn't have a meaning unless if there is at least 2 traces
if len(fio_data_file) > 1:
- f.write("call \'%s/graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode))
+ f.write("call \'%s/graph3D.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\'\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode))
# Setting up the compare files that will be plot later
compare=open(gnuplot_output_dir + 'compare.gnuplot','w')
@@ -93,10 +93,10 @@ set style line 1 lt 1 lw 3 pt 3 linecolor rgb "green"
compare_smooth.write("plot %s w l ls 1 ti 'Global average value (%.2f)'" % (global_avg,global_avg));
compare_trend.write("plot %s w l ls 1 ti 'Global average value (%.2f)'" % (global_avg,global_avg));
- pos=0
- # Let's create a temporary file for each selected fio file
- for file in fio_data_file:
- tmp_filename = "gnuplot_temp_file.%d" % pos
+ pos=0
+ # Let's create a temporary file for each selected fio file
+ for file in fio_data_file:
+ tmp_filename = "gnuplot_temp_file.%d" % pos
# Plotting comparing graphs doesn't have a meaning unless if there is at least 2 traces
if len(fio_data_file) > 1:
@@ -106,12 +106,12 @@ set style line 1 lt 1 lw 3 pt 3 linecolor rgb "green"
compare_trend.write(",\\\n'%s' using 2:3 smooth bezier title '%s'" % (tmp_filename,fio_data_file[pos]))
png_file=file.replace('.log','')
- raw_filename = "%s-2Draw" % (png_file)
- smooth_filename = "%s-2Dsmooth" % (png_file)
- trend_filename = "%s-2Dtrend" % (png_file)
- avg = average(disk_perf[pos])
- f.write("call \'%s/graph2D.gpm\' \'%s' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%f\'\n" % (gpm_dir,title,tmp_filename,fio_data_file[pos],raw_filename,mode,smooth_filename,trend_filename,avg))
- pos = pos +1
+ raw_filename = "%s-2Draw" % (png_file)
+ smooth_filename = "%s-2Dsmooth" % (png_file)
+ trend_filename = "%s-2Dtrend" % (png_file)
+ avg = average(disk_perf[pos])
+ f.write("call \'%s/graph2D.gpm\' \'%s' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%s\' \'%f\'\n" % (gpm_dir,title,tmp_filename,fio_data_file[pos],raw_filename,mode,smooth_filename,trend_filename,avg))
+ pos = pos +1
# Plotting comparing graphs doesn't have a meaning unless if there is at least 2 traces
if len(fio_data_file) > 1:
@@ -125,7 +125,7 @@ def generate_gnuplot_math_script(title,gnuplot_output_filename,mode,average,gnup
filename=gnuplot_output_dir+'mymath';
temporary_files.append(filename)
f=open(filename,'a')
- f.write("call \'%s/math.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\' %s\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode,average))
+ f.write("call \'%s/math.gpm\' \'%s' \'%s\' \'\' \'%s\' \'%s\' %s\n" % (gpm_dir,title,gnuplot_output_filename,gnuplot_output_filename,mode,average))
f.close()
def compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir):
@@ -250,10 +250,10 @@ def compute_math(fio_data_file, title,gnuplot_output_filename,gnuplot_output_dir
stddev_file.write('DiskName %s\n'% mode )
for disk in range(len(fio_data_file)):
# print disk_perf[disk]
- min_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
- max_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
- average_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
- stddev_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
+ min_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
+ max_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
+ average_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
+ stddev_file.write("# Disk%d was coming from %s\n" % (disk,fio_data_file[disk]))
avg = average(disk_perf[disk])
variance = [(x - avg)**2 for x in disk_perf[disk]]
standard_deviation = math.sqrt(average(variance))
@@ -406,126 +406,126 @@ def main(argv):
force_keep_temp_files=False
if not os.path.isfile(gpm_dir+'math.gpm'):
- gpm_dir="/usr/local/share/fio/"
- if not os.path.isfile(gpm_dir+'math.gpm'):
- print("Looks like fio didn't get installed properly as no gpm files found in '/usr/share/fio' or '/usr/local/share/fio'\n")
- sys.exit(3)
+ gpm_dir="/usr/local/share/fio/"
+ if not os.path.isfile(gpm_dir+'math.gpm'):
+ print("Looks like fio didn't get installed properly as no gpm files found in '/usr/share/fio' or '/usr/local/share/fio'\n")
+ sys.exit(3)
try:
- opts, args = getopt.getopt(argv[1:],"ghkbivo:d:t:p:G:m:M:",['bandwidth', 'iops', 'pattern', 'outputfile', 'outputdir', 'title', 'min_time', 'max_time', 'gnuplot', 'Global', 'help', 'verbose','keep'])
+ opts, args = getopt.getopt(argv[1:],"ghkbivo:d:t:p:G:m:M:",['bandwidth', 'iops', 'pattern', 'outputfile', 'outputdir', 'title', 'min_time', 'max_time', 'gnuplot', 'Global', 'help', 'verbose','keep'])
except getopt.GetoptError:
- print("Error: One of the options passed to the cmdline was not supported")
- print("Please fix your command line or read the help (-h option)")
- sys.exit(2)
+ print("Error: One of the options passed to the cmdline was not supported")
+ print("Please fix your command line or read the help (-h option)")
+ sys.exit(2)
for opt, arg in opts:
- if opt in ("-b", "--bandwidth"):
- pattern='*_bw.log'
- elif opt in ("-i", "--iops"):
- pattern='*_iops.log'
- elif opt in ("-v", "--verbose"):
- verbose=True
- elif opt in ("-k", "--keep"):
- #User really wants to keep the temporary files
- force_keep_temp_files=True
- elif opt in ("-p", "--pattern"):
- pattern_set_by_user=True
- pattern=arg
- pattern=pattern.replace('\\','')
- elif opt in ("-o", "--outputfile"):
- gnuplot_output_filename=arg
- elif opt in ("-d", "--outputdir"):
- gnuplot_output_dir=arg
- if not gnuplot_output_dir.endswith('/'):
- gnuplot_output_dir=gnuplot_output_dir+'/'
- if not os.path.exists(gnuplot_output_dir):
- os.makedirs(gnuplot_output_dir)
- elif opt in ("-t", "--title"):
- title=arg
- elif opt in ("-m", "--min_time"):
- min_time=arg
- elif opt in ("-M", "--max_time"):
- max_time=arg
- elif opt in ("-g", "--gnuplot"):
- run_gnuplot=True
- elif opt in ("-G", "--Global"):
- parse_global=True
- global_search=arg
- elif opt in ("-h", "--help"):
- print_help()
- sys.exit(1)
+ if opt in ("-b", "--bandwidth"):
+ pattern='*_bw.log'
+ elif opt in ("-i", "--iops"):
+ pattern='*_iops.log'
+ elif opt in ("-v", "--verbose"):
+ verbose=True
+ elif opt in ("-k", "--keep"):
+ #User really wants to keep the temporary files
+ force_keep_temp_files=True
+ elif opt in ("-p", "--pattern"):
+ pattern_set_by_user=True
+ pattern=arg
+ pattern=pattern.replace('\\','')
+ elif opt in ("-o", "--outputfile"):
+ gnuplot_output_filename=arg
+ elif opt in ("-d", "--outputdir"):
+ gnuplot_output_dir=arg
+ if not gnuplot_output_dir.endswith('/'):
+ gnuplot_output_dir=gnuplot_output_dir+'/'
+ if not os.path.exists(gnuplot_output_dir):
+ os.makedirs(gnuplot_output_dir)
+ elif opt in ("-t", "--title"):
+ title=arg
+ elif opt in ("-m", "--min_time"):
+ min_time=arg
+ elif opt in ("-M", "--max_time"):
+ max_time=arg
+ elif opt in ("-g", "--gnuplot"):
+ run_gnuplot=True
+ elif opt in ("-G", "--Global"):
+ parse_global=True
+ global_search=arg
+ elif opt in ("-h", "--help"):
+ print_help()
+ sys.exit(1)
# Adding .global extension to the file
if parse_global==True:
- if not gnuplot_output_filename.endswith('.global'):
- pattern = pattern+'.global'
+ if not gnuplot_output_filename.endswith('.global'):
+ pattern = pattern+'.global'
fio_data_file=find_file('.',pattern)
if len(fio_data_file) == 0:
- print("No log file found with pattern %s!" % pattern)
- # Try numjob log file format if per_numjob_logs=1
- if (pattern == '*_bw.log'):
- fio_data_file=find_file('.','*_bw.*.log')
- if (pattern == '*_iops.log'):
- fio_data_file=find_file('.','*_iops.*.log')
- if len(fio_data_file) == 0:
- sys.exit(1)
- else:
- print("Using log file per job format instead")
+ print("No log file found with pattern %s!" % pattern)
+ # Try numjob log file format if per_numjob_logs=1
+ if (pattern == '*_bw.log'):
+ fio_data_file=find_file('.','*_bw.*.log')
+ if (pattern == '*_iops.log'):
+ fio_data_file=find_file('.','*_iops.*.log')
+ if len(fio_data_file) == 0:
+ sys.exit(1)
+ else:
+ print("Using log file per job format instead")
else:
- print("%d files Selected with pattern '%s'" % (len(fio_data_file), pattern))
+ print("%d files Selected with pattern '%s'" % (len(fio_data_file), pattern))
fio_data_file=sorted(fio_data_file, key=str.lower)
for file in fio_data_file:
- print(' |-> %s' % file)
- if "_bw.log" in file :
- mode="Bandwidth (KB/sec)"
- if "_iops.log" in file :
- mode="IO per Seconds (IO/sec)"
+ print(' |-> %s' % file)
+ if "_bw.log" in file :
+ mode="Bandwidth (KB/sec)"
+ if "_iops.log" in file :
+ mode="IO per Seconds (IO/sec)"
if (title == 'No title') and (mode != 'unknown'):
- if "Bandwidth" in mode:
- title='Bandwidth benchmark with %d fio results' % len(fio_data_file)
- if "IO" in mode:
- title='IO benchmark with %d fio results' % len(fio_data_file)
+ if "Bandwidth" in mode:
+ title='Bandwidth benchmark with %d fio results' % len(fio_data_file)
+ if "IO" in mode:
+ title='IO benchmark with %d fio results' % len(fio_data_file)
print()
#We need to adjust the output filename regarding the pattern required by the user
if (pattern_set_by_user == True):
- gnuplot_output_filename=pattern
- # As we do have some glob in the pattern, let's make this simpliest
- # We do remove the simpliest parts of the expression to get a clear file name
- gnuplot_output_filename=gnuplot_output_filename.replace('-*-','-')
- gnuplot_output_filename=gnuplot_output_filename.replace('*','-')
- gnuplot_output_filename=gnuplot_output_filename.replace('--','-')
- gnuplot_output_filename=gnuplot_output_filename.replace('.log','')
- # Insure that we don't have any starting or trailing dash to the filename
- gnuplot_output_filename = gnuplot_output_filename[:-1] if gnuplot_output_filename.endswith('-') else gnuplot_output_filename
- gnuplot_output_filename = gnuplot_output_filename[1:] if gnuplot_output_filename.startswith('-') else gnuplot_output_filename
- if (gnuplot_output_filename == ''):
- gnuplot_output_filename='default'
+ gnuplot_output_filename=pattern
+ # As we do have some glob in the pattern, let's make this simpliest
+ # We do remove the simpliest parts of the expression to get a clear file name
+ gnuplot_output_filename=gnuplot_output_filename.replace('-*-','-')
+ gnuplot_output_filename=gnuplot_output_filename.replace('*','-')
+ gnuplot_output_filename=gnuplot_output_filename.replace('--','-')
+ gnuplot_output_filename=gnuplot_output_filename.replace('.log','')
+ # Insure that we don't have any starting or trailing dash to the filename
+ gnuplot_output_filename = gnuplot_output_filename[:-1] if gnuplot_output_filename.endswith('-') else gnuplot_output_filename
+ gnuplot_output_filename = gnuplot_output_filename[1:] if gnuplot_output_filename.startswith('-') else gnuplot_output_filename
+ if (gnuplot_output_filename == ''):
+ gnuplot_output_filename='default'
if parse_global==True:
- parse_global_files(fio_data_file, global_search)
+ parse_global_files(fio_data_file, global_search)
else:
- blk_size=compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir,min_time,max_time)
- title="%s @ Blocksize = %dK" % (title,blk_size/1024)
- compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir)
- compute_math(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
- generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
-
- if (run_gnuplot==True):
- render_gnuplot(fio_data_file, gnuplot_output_dir)
-
- # Shall we clean the temporary files ?
- if keep_temp_files==False and force_keep_temp_files==False:
- # Cleaning temporary files
- if verbose: print("Cleaning temporary files")
- for f in enumerate(temporary_files):
- if verbose: print(" -> %s"%f[1])
- try:
- os.remove(f[1])
- except:
- True
+ blk_size=compute_temp_file(fio_data_file,disk_perf,gnuplot_output_dir,min_time,max_time)
+ title="%s @ Blocksize = %dK" % (title,blk_size/1024)
+ compute_aggregated_file(fio_data_file, gnuplot_output_filename, gnuplot_output_dir)
+ compute_math(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
+ generate_gnuplot_script(fio_data_file,title,gnuplot_output_filename,gnuplot_output_dir,mode,disk_perf,gpm_dir)
+
+ if (run_gnuplot==True):
+ render_gnuplot(fio_data_file, gnuplot_output_dir)
+
+ # Shall we clean the temporary files ?
+ if keep_temp_files==False and force_keep_temp_files==False:
+ # Cleaning temporary files
+ if verbose: print("Cleaning temporary files")
+ for f in enumerate(temporary_files):
+ if verbose: print(" -> %s"%f[1])
+ try:
+ os.remove(f[1])
+ except:
+ True
#Main
if __name__ == "__main__":

View File

@ -1,44 +0,0 @@
diff --git a/fio-3.7/configure b/fio-3.7-edit/configure
index 9bdc7a1..ed345ba 100755
--- a/configure
+++ b/configure
@@ -2462,3 +2462,22 @@ SRCDIR:=`dirname $0`
include \$(SRCDIR)/Makefile
EOF
fi
+
+##########################################
+# check for gettid()
+gettid="no"
+cat > $TMPC << EOF
+#include <unistd.h>
+int main(int argc, char **argv)
+{
+ return gettid();
+}
+EOF
+if compile_prog "" "" "gettid"; then
+ gettid="yes"
+fi
+print_config "gettid" "$gettid"
+
+if test "$gettid" = "yes"; then
+ output_sym "CONFIG_HAVE_GETTID"
+fi
diff --git a/fio-3.7/os/os-linux.h b/fio-3.7-edit/os/os-linux.h
index a550bba..90d8929 100644
--- a/os/os-linux.h
+++ b/os/os-linux.h
@@ -126,10 +126,12 @@ static inline int ioprio_set(int which, int who, int ioprio_class, int ioprio)
return syscall(__NR_ioprio_set, which, who, ioprio);
}
+#ifndef CONFIG_HAVE_GETTID
static inline int gettid(void)
{
return syscall(__NR_gettid);
}
+#endif
#define SPLICE_DEF_SIZE (64*1024)