2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-25 15:07:05 +00:00
Commit Graph

6 Commits

Author SHA1 Message Date
Thadeu Lima de Souza Cascardo
e81541398a perf-counter: Fix segfaults on non-Linux platforms.
Commit 0eee08dbddea520536197657da7a0b (perf-counter: simplify the
performance macro) introduces the PERF macro, which is empty for non-linux
platforms.

Added to commit bc487aeff2 (ovsdb: Add per
transaction commit instruction counter), that uses such macro, it causes
segfaults, since it makes ovsdb_txn_commit return an uninitialized pointer as
error.

Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@redhat.com>
[blp@nicira.com added {} around the macro expansion]
Signed-off-by: Ben Pfaff <blp@nicira.com>
2015-07-24 09:20:05 -07:00
Andy Zhou
73ec82bf5a perf-counter: simplify the performance macro
Replace the original PERF_FUNCTION_BEGIN and PERF_FUNCTION_END
pair with a single PERF macro. This design is also more flexible,
removing the restriction of have only one measurement per function.

The next patch will make use of this macro.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-17 12:24:22 -07:00
Andy Zhou
8790a8b4ef perf-counter: remove initial VLOG_INFO message when performance counter is not available
Unit tests "corrupted database log" and "database log with bad
transaction" will fail without this patch.

Reported-by: Ansis Atteka <aatteka@nicira.com>¬
Signed-off-by: Andy Zhou <azhou@nicira.com>
2015-04-16 15:27:23 -07:00
Andy Zhou
9a6156bb8e autoconf: check for linux/perf_event.h
Older Linux prior to version 2.6.32 do not support user mode
performance events, They also don't have 'linux/perf_event.h' header
file. Add check for those older Linux to conditionally compile
perf-counter.c

Reported-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Alex Wang <alexw@nicira.com>
2015-04-16 14:21:05 -07:00
Andy Zhou
d663136e85 perf-counters: fix non-linux build
Commit '97a3c43515e' misses definitions for non-Linux platforms thus
broke builds for any non-Linux platform.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2015-04-14 14:08:47 -07:00
Andy Zhou
619c3a42dc lib: add a hardware performance counter access library
First cut of adding a performance library that provides access to
hardware counters. Please see comments in perf-counter.h for
more details.

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
2015-04-13 17:23:09 -07:00