X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=tools%2Fperf%2Futil%2Futil.c;h=a789f952b3e9b8d84c6999f5486fb25d5a3676ba;hb=15bcdc9477b03eb035052412c3a087e11e855e76;hp=4c360daa4e242cc493e4957a7d46eca62ecbca09;hpb=02982f8550b3f2d908848f417ba802193dee5f4a;p=linux-2.6-microblaze.git diff --git a/tools/perf/util/util.c b/tools/perf/util/util.c index 4c360daa4e24..a789f952b3e9 100644 --- a/tools/perf/util/util.c +++ b/tools/perf/util/util.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 #include "../perf.h" #include "util.h" #include "debug.h" @@ -6,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +24,19 @@ /* * XXX We need to find a better place for these things... */ + +bool perf_singlethreaded = true; + +void perf_set_singlethreaded(void) +{ + perf_singlethreaded = true; +} + +void perf_set_multithreaded(void) +{ + perf_singlethreaded = false; +} + unsigned int page_size; int cacheline_size; @@ -174,7 +189,7 @@ out: return err; } -int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size) +static int copyfile_offset(int ifd, loff_t off_in, int ofd, loff_t off_out, u64 size) { void *ptr; loff_t pgoff;