aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/bench/futex-lock-pi.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2020-08-05 11:19:16 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2020-08-05 11:19:16 +0200
commitfcb0d3ef9b1752014ea5ad66635ca2095960e900 (patch)
treefe440fae302ce2908cb393eec87ec97da3e011b9 /tools/perf/bench/futex-lock-pi.c
parent5bf32f1a9bcc3a2ec284b4226b277b072b06784e (diff)
parent1b940bbc5c55551a3420f403a2b10cb884cffb01 (diff)
Merge 5.4.56 into android11-5.4ASB-2020-08-05_11-5.4
Changes in 5.4.56 crypto: ccp - Release all allocated memory if sha type is invalid media: rc: prevent memory leak in cx23888_ir_probe sunrpc: check that domain table is empty at module unload. ath10k: enable transmit data ack RSSI for QCA9884 PCI/ASPM: Disable ASPM on ASMedia ASM1083/1085 PCIe-to-PCI bridge mm/filemap.c: don't bother dropping mmap_sem for zero size readahead ALSA: usb-audio: Add implicit feedback quirk for SSL2 ALSA: hda/realtek: enable headset mic of ASUS ROG Zephyrus G15(GA502) series with ALC289 ALSA: hda/realtek: typo_fix: enable headset mic of ASUS ROG Zephyrus G14(GA401) series with ALC289 ALSA: hda/realtek: Fix add a "ultra_low_power" function for intel reference board (alc256) ALSA: hda/realtek - Fixed HP right speaker no sound ALSA: hda/hdmi: Fix keep_power assignment for non-component devices IB/rdmavt: Fix RQ counting issues causing use of an invalid RWQE vhost/scsi: fix up req type endian-ness 9p/trans_fd: Fix concurrency del of req_list in p9_fd_cancelled/p9_read_work wireless: Use offsetof instead of custom macro. ARM: 8986/1: hw_breakpoint: Don't invoke overflow handler on uaccess watchpoints ARM: dts: imx6sx-sabreauto: Fix the phy-mode on fec2 ARM: dts: imx6sx-sdb: Fix the phy-mode on fec2 ARM: dts: imx6qdl-icore: Fix OTG_ID pin and sdcard detect virtio_balloon: fix up endian-ness for free cmd id Revert "drm/amdgpu: Fix NULL dereference in dpm sysfs handlers" drm/amd/display: Clear dm_state for fast updates drm/amdgpu: Prevent kernel-infoleak in amdgpu_info_ioctl() drm/dbi: Fix SPI Type 1 (9-bit) transfer drm: hold gem reference until object is no longer accessed rds: Prevent kernel-infoleak in rds_notify_queue_get() libtraceevent: Fix build with binutils 2.35 net/x25: Fix x25_neigh refcnt leak when x25 disconnect net/x25: Fix null-ptr-deref in x25_disconnect xfrm: policy: match with both mark and mask on user interfaces ARM: dts sunxi: Relax a bit the CMA pool allocation range xfrm: Fix crash when the hold queue is used. ARM: dts: armada-38x: fix NETA lockup when repeatedly switching speeds nvme-tcp: fix possible hang waiting for icresp response selftests/net: rxtimestamp: fix clang issues for target arch PowerPC selftests/net: psock_fanout: fix clang issues for target arch PowerPC selftests/net: so_txtime: fix clang issues for target arch PowerPC sh/tlb: Fix PGTABLE_LEVELS > 2 sh: Fix validation of system call number net: hns3: fix a TX timeout issue net: hns3: fix aRFS FD rules leftover after add a user FD rule net/mlx5: E-switch, Destroy TSAR when fail to enable the mode net/mlx5e: Fix error path of device attach net/mlx5: Verify Hardware supports requested ptp function on a given pin net/mlx5e: Modify uplink state on interface up/down net/mlx5e: Fix kernel crash when setting vf VLANID on a VF dev net: lan78xx: add missing endpoint sanity check net: lan78xx: fix transfer-buffer memory leak rhashtable: Fix unprotected RCU dereference in __rht_ptr mlx4: disable device on shutdown mlxsw: core: Increase scope of RCU read-side critical section mlxsw: core: Free EMAD transactions using kfree_rcu() ibmvnic: Fix IRQ mapping disposal in error path bpf: Fix map leak in HASH_OF_MAPS map mac80211: mesh: Free ie data when leaving mesh mac80211: mesh: Free pending skb when destroying a mpath arm64/alternatives: move length validation inside the subsection arm64: csum: Fix handling of bad packets Bluetooth: fix kernel oops in store_pending_adv_report net: nixge: fix potential memory leak in nixge_probe() net: gemini: Fix missing clk_disable_unprepare() in error path of gemini_ethernet_port_probe() net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq perf tools: Fix record failure when mixed with ARM SPE event vxlan: fix memleak of fdb usb: hso: Fix debug compile warning on sparc32 selftests: fib_nexthop_multiprefix: fix cleanup() netns deletion qed: Disable "MFW indication via attention" SPAM every 5 minutes selftests: net: ip_defrag: modprobe missing nf_defrag_ipv6 support nfc: s3fwrn5: add missing release on skb in s3fwrn5_recv_frame scsi: core: Run queue in case of I/O resource contention failure parisc: add support for cmpxchg on u8 pointers net: ethernet: ravb: exit if re-initialization fails in tx timeout Revert "i2c: cadence: Fix the hold bit setting" x86/unwind/orc: Fix ORC for newly forked tasks x86/stacktrace: Fix reliable check for empty user task stacks cxgb4: add missing release on skb in uld_send() xen-netfront: fix potential deadlock in xennet_remove() RISC-V: Set maximum number of mapped pages correctly drivers/net/wan: lapb: Corrected the usage of skb_cow KVM: arm64: Don't inherit exec permission across page-table levels KVM: LAPIC: Prevent setting the tscdeadline timer if the lapic is hw disabled x86/i8259: Use printk_deferred() to prevent deadlock perf tests bp_account: Make global variable static perf env: Do not return pointers to local variables perf bench: Share some global variables to fix build with gcc 10 Linux 5.4.56 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I06b0147860242cfcac3dd8a7acefdb211020cab1
Diffstat (limited to 'tools/perf/bench/futex-lock-pi.c')
-rw-r--r--tools/perf/bench/futex-lock-pi.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/tools/perf/bench/futex-lock-pi.c b/tools/perf/bench/futex-lock-pi.c
index d0cae8125423..30d97121dc4f 100644
--- a/tools/perf/bench/futex-lock-pi.c
+++ b/tools/perf/bench/futex-lock-pi.c
@@ -37,7 +37,6 @@ static bool silent = false, multi = false;
static bool done = false, fshared = false;
static unsigned int nthreads = 0;
static int futex_flag = 0;
-struct timeval start, end, runtime;
static pthread_mutex_t thread_lock;
static unsigned int threads_starting;
static struct stats throughput_stats;
@@ -64,7 +63,7 @@ static void print_summary(void)
printf("%sAveraged %ld operations/sec (+- %.2f%%), total secs = %d\n",
!silent ? "\n" : "", avg, rel_stddev_stats(stddev, avg),
- (int) runtime.tv_sec);
+ (int)bench__runtime.tv_sec);
}
static void toggle_done(int sig __maybe_unused,
@@ -73,8 +72,8 @@ static void toggle_done(int sig __maybe_unused,
{
/* inform all threads that we're done for the day */
done = true;
- gettimeofday(&end, NULL);
- timersub(&end, &start, &runtime);
+ gettimeofday(&bench__end, NULL);
+ timersub(&bench__end, &bench__start, &bench__runtime);
}
static void *workerfn(void *arg)
@@ -185,7 +184,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
threads_starting = nthreads;
pthread_attr_init(&thread_attr);
- gettimeofday(&start, NULL);
+ gettimeofday(&bench__start, NULL);
create_threads(worker, thread_attr, cpu);
pthread_attr_destroy(&thread_attr);
@@ -211,7 +210,7 @@ int bench_futex_lock_pi(int argc, const char **argv)
pthread_mutex_destroy(&thread_lock);
for (i = 0; i < nthreads; i++) {
- unsigned long t = worker[i].ops/runtime.tv_sec;
+ unsigned long t = worker[i].ops / bench__runtime.tv_sec;
update_stats(&throughput_stats, t);
if (!silent)