aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/elog.c
AgeCommit message (Collapse)AuthorFilesLines
2022-08-23vppinfra: fix coverity 249217Andrew Yourtchenko1-1/+1
Zero-initialize the temporary struct. Type: fix Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com> Change-Id: I8d73feae427a17470c47d1551ba7078213b589fc
2022-04-04vppinfra: make _vec_len() read-onlyDamjan Marion1-1/+1
Use of _vec_len() to set vector length breaks address sanitizer. Users should use vec_set_len(), vec_inc_len(), vec_dec_len () instead. Type: improvement Change-Id: I441ae948771eb21c23a61f3ff9163bdad74a2cb8 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-05-06vppinfra: fix testsDamjan Marion1-6/+6
Type: fix Change-Id: If59a66aae658dd35dbcb4987ab00c306b3c6e2e2 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-11-25vlib: add elog events for vlib log entriesDave Barach1-6/+17
Pretty interesting to see how long plugins take to load. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: If496eb73b2e1fd9dd714142cd5195fa7ccd93ebd
2020-10-20vppinfra: export elog_read_file_not_inline()Dave Barach1-1/+1
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ib9fb1723b55bf322c9fd9f928a3e3b4a529bca5b
2020-10-18vppinfra: add export symbolsDave Barach1-1/+1
format_one_elog_event() vec_len_not_inline() vec_free_not_inline() Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I0432c1b41b985de380e0b73886d0b03ecc19c703
2020-10-17vppinfra: export elog_get_events()Dave Barach1-1/+1
Type: fix Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ifc1bcbd8b5f8597796c993a2a5caf3a6c8d2471c
2020-10-17vppinfra: explicitly export symbolsDamjan Marion1-9/+9
Type: improvement Change-Id: I57a9f85f7df1fc48656b72592349f4c544302f77 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-10-08vppinfra: memory leak be goneDave Barach1-1/+1
Type: fix Fixes: ab1a50cf7407e31097b550226c2b6954d6371bea / gerrit 29272 Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ic8146a66b54bb9ac6223cf984d4566554b73276d
2020-10-06misc: add xxx_not_inlineDave Barach1-2/+2
vlib_main_t *vlib_get_main_not_inline(void) vlib_thread_main_t *vlib_get_thread_main_not_inline(void) elog_main_t *vlib_get_elog_main_not_inline() Type: refactor Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I6de306d567283ad28ef34c9be0cf27452aecbf6c
2020-08-21vppinfra: add format_one_elog_eventDave Barach1-0/+9
To avoid ridiculous pointer gymnastics in golang Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: Ic5a641c18281970e2b9bc3013a54cfc3ae92e372
2020-08-19vppinfra: minor tweaks for cgo interoperationDave Barach1-11/+45
'type' is a keyword in golang, so s/type/event_type/ in elog.h and elsewhere. Add vec_len_not_inline(...), elog_write_file_not_inline(...) and elog_read_file_not_inline(...) since the inline forms aren't usable. More such tweaks may follow. Type: improvement Signed-off-by: Dave Barach <dave@barachs.net> Change-Id: I9a80a6afa635f5cdedee554ee9abe400fafc1cb6
2019-07-30vppinfra: refactor use of CLIB_MEMORY_BARRIER ()jaszha031-2/+1
All instances of test_and_set locks used the following sequence to release the locks: CLIB_MEMORY_BARRIER (); p->lock = 0; // p is a generic struct with a TAS lock Use clib_atomic_release to generate more efficient assembly code. Type: refactor Change-Id: Idca3a38b1cf43578108bdd1afe83b6ebc17a4c68 Signed-off-by: Jason Zhang <jason.zhang2@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-07-30vppinfra: conformed spinlocks to use CLIB_PAUSEjaszha031-1/+2
Modified test-and-set spin locks to call CLIB_PAUSE () when spinning for code consistency. Decreases the memory bandwidth consumed. Type: fix Change-Id: I1cca4f87f44f23f257c7a35466cd2e7767072f51 Signed-off-by: Jason Zhang <jason.zhang2@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Lijian Zhang <Lijian.Zhang@arm.com>
2019-07-17vppinfra: elog: fix read overflow in string lookupBenoît Ganne1-5/+7
elog string hashtable use strlen() to determine string length for hashing, strings must be NULL-terminated for both inserts and lookups. Type: fix Fixes: 9c8ca8dd3197e40dfcb8bcecd95c10eeb56239ed Change-Id: I0680d39a9b89411055fd6adc89c9f253adfae32c Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-06-14vppinfra: optimize elog_stringDave Barach1-5/+28
Add a string hash to make sure that strings in the string table are unique. This optimization has been coded piecemeal in multiple places, we should have made the underlying function do the work years ago. Type: fix Change-Id: I5010fd4926b9b80ce3a168748f6de64e333ef498 Signed-off-by: Dave Barach <dave@barachs.net>
2019-06-04elog: make elog_string() multi-thread safeSteven Luong1-0/+2
elog is supposed to be thread safe. Yet elog_string() is not. To fulfill that promise, let's make elog_string() thread safe to avoid surprises. Change-Id: Iab82faa7cb6719777a66c3ff14775e59a6a68a20 Signed-off-by: Steven Luong <sluong@cisco.com>
2018-12-19session: add cli option to dump session elogFlorin Coras1-1/+24
Change-Id: I1f42644f143bb65ee764c0f869b402595126adac Signed-off-by: Florin Coras <fcoras@cisco.com>
2018-10-23c11 safe string handling supportDave Barach1-2/+2
Change-Id: Ied34720ca5a6e6e717eea4e86003e854031b6eab Signed-off-by: Dave Barach <dave@barachs.net>
2018-10-19vppinfra: add atomic macros for __sync builtinsSirshak Das1-1/+1
This is first part of addition of atomic macros with only macros for __sync builtins. - Based on earlier patch by Damjan (https://gerrit.fd.io/r/#/c/10729/) Additionally - clib_atomic_release macro added and used in the absence of any memory barrier. - clib_atomic_bool_cmp_and_swap added Change-Id: Ie4e48c1e184a652018d1d0d87c4be80ddd180a3b Original-patch-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Sirshak Das <sirshak.das@arm.com> Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com> Reviewed-by: Ola Liljedahl <ola.liljedahl@arm.com> Reviewed-by: Steve Capper <steve.capper@arm.com>
2018-09-27Trivial: Cleanup some typos.Paul Vinciguerra1-1/+1
This is a new commit for code under a different maintainer. Change-Id: I79fa403fec6a312238a9a4b18b35dbcafaa05439 Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
2018-09-03Compile vppinfra on macOSDamjan Marion1-0/+4
Add missing calls to clib_mem_init to vppinfra test codes. Change-Id: I53ffc6fc287d1a378065bb86c18b6e995ecdb775 Signed-off-by: Damjan Marion <damarion@cisco.com> Signed-off-by: Dave Barach <dave@barachs.net>
2017-06-30VPP-893: handle multiple simultaneous event registrationsDave Barach1-0/+7
Change-Id: I8cd90820624987dbef848935e2de86fa66a86c17 Signed-off-by: Dave Barach <dave@barachs.net>
2017-04-01Clean up event log merge codeDave Barach1-18/+63
Fix a decade-old ridiculous qsort function bug. Managed to subtract floating-point numbers as if they were integers, leading to manufactured time-paradoxes. That completely confuses g2, leading to the summary disappearance of entire tracks' worth of data at high zoom levels. Add a manual alignment tweak parameter to elog_merge, users can dial-out time paradoxes caused by NTP-grade clock synchronization. The event-logger has a precision of O(100ns), whereas NTP synchronization is O(1ms). Change-Id: I69dedabaa314f69f9df74ec9ee66e21e6c87f703 Signed-off-by: Dave Barach <dave@barachs.net>
2016-12-28Reorganize source tree to use single autotools instanceDamjan Marion1-0/+1061
Change-Id: I7b51f88292e057c6443b12224486f2d0c9f8ae23 Signed-off-by: Damjan Marion <damarion@cisco.com>