platform/core/system/dlog.git
3 years agoLink to libraries that are actually used 14/239214/4 accepted/tizen/unified/20200724.124232 submit/tizen/20200723.024804
Karol Lewandowski [Wed, 22 Jul 2020 12:27:56 +0000 (14:27 +0200)]
Link to libraries that are actually used

Change-Id: I3a50380525b3e39221a6db8093ad9164a67739a4

3 years agolibdlogutil: `connect` guarantees non-garbage outvalue 12/239212/1
Mateusz Majewski [Tue, 21 Jul 2020 16:37:48 +0000 (18:37 +0200)]
libdlogutil: `connect` guarantees non-garbage outvalue

Change-Id: I499ba6b64b78dacfb1cffb03d160e9702adde1df

3 years agolibdlogutil: documentation errata 11/239211/1
Mateusz Majewski [Tue, 21 Jul 2020 16:36:52 +0000 (18:36 +0200)]
libdlogutil: documentation errata

Change-Id: Ibaccae9d1912245d859909ff7268c5473776f981

3 years agolibdlogutil: various getters work upon the state 26/238826/4
Mateusz Majewski [Mon, 6 Jul 2020 13:16:43 +0000 (15:16 +0200)]
libdlogutil: various getters work upon the state

Change-Id: I1d95a84731f669d0a5ea6a9a6fb2a51869f5780c

3 years agoRemove incorrect references to DLOGUTIL_MODE_CONTINUOUS 80/239080/2 accepted/tizen/unified/20200723.161228 submit/tizen/20200722.061245
Mateusz Majewski [Tue, 21 Jul 2020 10:43:25 +0000 (12:43 +0200)]
Remove incorrect references to DLOGUTIL_MODE_CONTINUOUS

They don't make sense now, since it is no longer a value meaning no dump
and equal to 0, but instead just a single value in the enum, which is
meaningless when converted to 0.

Change-Id: I328a823b57368ddf77cdd38a8b429cafd90b6833

3 years agoFix dispatch_event_reader_common a bit 39/238939/3
Mateusz Majewski [Mon, 20 Jul 2020 12:53:22 +0000 (14:53 +0200)]
Fix dispatch_event_reader_common a bit

Change-Id: I80c62581c8fb1a894bd2eac16391431aa2744e23

3 years agoFix has_required_privlege signature in the header 76/239076/1
Mateusz Majewski [Tue, 21 Jul 2020 10:43:00 +0000 (12:43 +0200)]
Fix has_required_privlege signature in the header

Change-Id: Ic94053ac0b2280c39b243cec0800d2a997986f0a

3 years agoImprove logutil error handling 27/238927/1
Mateusz Majewski [Mon, 20 Jul 2020 09:05:39 +0000 (11:05 +0200)]
Improve logutil error handling

Change-Id: I88aeae0434ab45855f4aac297abb60c1c7b70dbe

3 years agoReduce code repetition 25/238825/2
Mateusz Majewski [Fri, 17 Jul 2020 12:32:57 +0000 (14:32 +0200)]
Reduce code repetition

Change-Id: I95057fde7c094db250b93cdbfb42bdc5bc666605

3 years agoRemove an unnecessary string comparison 24/238824/2
Mateusz Majewski [Fri, 17 Jul 2020 12:08:48 +0000 (14:08 +0200)]
Remove an unnecessary string comparison

Change-Id: I6733d5f777129c5df40fc4f2f4fafa0d9bd5634c

4 years agoReword misleading comment 88/238788/1
Mateusz Majewski [Fri, 17 Jul 2020 08:33:38 +0000 (10:33 +0200)]
Reword misleading comment

It suggests that the function also processes the KMSG buffer, but it
does not; the KMSG buffer is processed in the service_writer_kmsg
function.

Change-Id: I5e50765503fe020ee332294105f517b30e52a3d5

4 years agolibdlogutil: Rearrange config & state members according to their size 98/238698/1
Karol Lewandowski [Thu, 16 Jul 2020 09:29:27 +0000 (11:29 +0200)]
libdlogutil: Rearrange config & state members according to their size

Change-Id: I660bcaf57f051440b8e0746b3b6efbdc8f101790

4 years agolibdlogutil: Consistent state & config member naming 97/238697/1
Karol Lewandowski [Thu, 16 Jul 2020 09:21:11 +0000 (11:21 +0200)]
libdlogutil: Consistent state & config member naming

Rename dlogutil_state.logs_dump to .dump_size, consistently with
dlogutil_config.dump_size (which contains exactly same information).

Change-Id: I34cbe6182d32ac42a45054c731333a164273dc48

4 years agolibdlogutil: Drop unused dlogutil_state member 96/238696/1
Karol Lewandowski [Thu, 16 Jul 2020 09:11:30 +0000 (11:11 +0200)]
libdlogutil: Drop unused dlogutil_state member

Change-Id: Iba05e67445d0873547c4299af8de67b08f998b4a

4 years agosort_vector: move dumping size considerations up 21/238621/2
Michal Bloch [Wed, 15 Jul 2020 11:05:31 +0000 (13:05 +0200)]
sort_vector: move dumping size considerations up

Sort vector now just has the exact size it is told to have.
How dumping affects this value is none of its business and
is now taken care of by the higher layer.

Change-Id: I058a5ec9e412234a1b0b8958f8e9d2bdad5574ec
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: follow-up mode internals refactor 17/238517/2
Michal Bloch [Tue, 14 Jul 2020 16:31:50 +0000 (18:31 +0200)]
libdlogutil: follow-up mode internals refactor

Change-Id: I22f37f1dfe7ac32d20a54f870181ad9d7679378a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoAdd a hashing function (incl. tests) 90/235890/8
Agnieszka Baumann [Wed, 10 Jun 2020 15:45:00 +0000 (17:45 +0200)]
Add a hashing function (incl. tests)

To be used for libdlog deduplication

Change-Id: I1cea213fcb191b1b306fe6a021366f18f1716dfe

4 years agolibdlogutil: introduce connect API 25/238225/3
Mateusz Majewski [Wed, 1 Jul 2020 08:21:52 +0000 (10:21 +0200)]
libdlogutil: introduce connect API

This commit additionally adds "mode" as a separate enum in the
config struct.  Refactoring the rest of the state to be done in
another commit.

Original API change introduced Mateusz Majewski, altered by Karol
Lewandowski, made to work again by Michał Bloch.

Change-Id: I750a33545ef8f7e52557a13a7e98c2fc2c25a667
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: remove the defaults integration test 32/238232/1
Michal Bloch [Thu, 9 Jul 2020 12:31:58 +0000 (14:31 +0200)]
libdlogutil: remove the defaults integration test

Passing a valid config is now mandatory; uninitialized
values are validated by the "dump" test.

Change-Id: Ifb94e88dd49dc81807b99f58b4dcda8db1e670ee
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: add buffer setting 90/238090/2
Mateusz Majewski [Wed, 1 Jul 2020 08:44:37 +0000 (10:44 +0200)]
libdlogutil: add buffer setting

Change-Id: I88e27328b148f145d5438018219f7e2831fdaa55

4 years agodlog_logger: clear internal buffers properly 19/237919/2
Michal Bloch [Mon, 6 Jul 2020 11:35:29 +0000 (13:35 +0200)]
dlog_logger: clear internal buffers properly

Change-Id: I3f96812b1387f96f48055d01f951f7254e98e643
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agodlog_logger: bring back localtime() caching 43/237043/3
Karol Lewandowski [Wed, 24 Jun 2020 09:02:42 +0000 (11:02 +0200)]
dlog_logger: bring back localtime() caching

This reverts commit d5bffc25a9ddc4c32f9238656946911bc99edd94.

The overhead of non-cached localtime() is ~90% CPU time according
to valgrind's callgrind (cached variant drops to ~60% CPU).

While real numbers can be lower it's still too large to justify
using non-cached variant.

Change-Id: I802b4fa80662ee376ee13a90123abe6c7f96d600

4 years agoFix obsolete sorting/filter docs 93/237693/1 accepted/tizen/unified/20200707.140855 submit/tizen/20200707.013715
Michal Bloch [Thu, 2 Jul 2020 11:58:25 +0000 (13:58 +0200)]
Fix obsolete sorting/filter docs

Change-Id: I4ac1bc2ba0cfbd45615c05389df7811aa4b34f52
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: get_logs_internal accepts a config_s 81/237581/3
Michal Bloch [Wed, 1 Jul 2020 08:57:20 +0000 (10:57 +0200)]
libdlogutil: get_logs_internal accepts a config_s

Change-Id: Iaf7e40ed75a603f356061d17e032e6b5831809e6

4 years agolibdlogutil: remove the old blocking API 80/237580/3
Michal Bloch [Fri, 26 Jun 2020 17:12:12 +0000 (19:12 +0200)]
libdlogutil: remove the old blocking API

Change-Id: I43f3ad69daf5d9ef4f3d6dd2b57af2a74ffdac51
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoKeep only buffer ID in the fd_info struct 98/237598/1
Mateusz Majewski [Wed, 1 Jul 2020 12:42:49 +0000 (14:42 +0200)]
Keep only buffer ID in the fd_info struct

Change-Id: I2cdd014a68feab42fd25ec9f3bba6f3be536248f

4 years agoRewrite dlogutil to use the new libdlogutil API 64/235564/9
Mateusz Majewski [Fri, 20 Mar 2020 14:11:58 +0000 (15:11 +0100)]
Rewrite dlogutil to use the new libdlogutil API

Change-Id: I36371311a18950fc69e3f2669b050e93dae84045

4 years agoAdd the new libdlogutil API 41/235541/8
Mateusz Majewski [Wed, 1 Jul 2020 10:54:18 +0000 (12:54 +0200)]
Add the new libdlogutil API

Change-Id: I825042f1f91d84672ba586fc62038c034958686e

4 years agoFix the docs a bit 77/237577/1
Mateusz Majewski [Wed, 1 Jul 2020 10:53:50 +0000 (12:53 +0200)]
Fix the docs a bit

Change-Id: I77eaa7ff97c2ac273bd0e9e362a15793fe74be54

4 years agoAdd description for pragma GCC diagnostic warning "-Wformat" 06/237506/1
Hyotaek Shim [Wed, 1 Jul 2020 04:41:55 +0000 (13:41 +0900)]
Add description for pragma GCC diagnostic warning "-Wformat"

Change-Id: I0ef91634dfe648186ec344b3a84b9a98f9f9d61d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agolibdlogutil: move sorting/filters to internal 60/237360/2
Michal Bloch [Wed, 24 Jun 2020 14:47:31 +0000 (16:47 +0200)]
libdlogutil: move sorting/filters to internal

Change-Id: Id53c5e2cba1baaa7dbcd2ccd3bd8de8239e7bafc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agodlogutil: use the new config_s interfaces 59/237359/2
Michal Bloch [Wed, 24 Jun 2020 12:13:52 +0000 (14:13 +0200)]
dlogutil: use the new config_s interfaces

Change-Id: I99d60c8216fdc9eb9de4e87a21a7c3de90690bb6
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlogutil: add config functions 55/237355/3
Mateusz Majewski [Thu, 25 Jun 2020 13:00:40 +0000 (15:00 +0200)]
libdlogutil: add config functions

Change-Id: Ibfbc784c3fe0a1bd859909ff7268c5473776f981

4 years agolog_format_log_line: Move variable declarations near to their usage 53/237153/4
Karol Lewandowski [Thu, 25 Jun 2020 09:54:35 +0000 (11:54 +0200)]
log_format_log_line: Move variable declarations near to their usage

Change-Id: Ie7dc69005c1a05c2d3c0c4ae58ed65e898b8f33a

4 years agolog_format_log_line: Call localtime() only when needed 65/237065/4
Karol Lewandowski [Wed, 24 Jun 2020 21:45:08 +0000 (23:45 +0200)]
log_format_log_line: Call localtime() only when needed

localtime() is costly, it's best if it can be avoided.

Change-Id: I6d73142f60e33493bc0b6a96b8c534bcf51725d4

4 years agolog_format_log_line: Use timespecs directly 52/237052/3
Karol Lewandowski [Wed, 24 Jun 2020 10:21:32 +0000 (12:21 +0200)]
log_format_log_line: Use timespecs directly

This Occamifies the code, ie. "entities should not be
multiplied without necessity."

Change-Id: I1d64b0563c5e921d0aa99fe0c91e3a0647232ed9

4 years agoMerge "localtime: use reentrant variant" into tizen
Karol Lewandowski [Wed, 24 Jun 2020 09:09:39 +0000 (09:09 +0000)]
Merge "localtime: use reentrant variant" into tizen

4 years agolibdlog: add a priority based pre-filter 66/226766/6
Michal Bloch [Wed, 4 Mar 2020 16:37:06 +0000 (17:37 +0100)]
libdlog: add a priority based pre-filter

Change-Id: I7850cdbfc06c1cbc5313a050bf8582fc8c9a4178
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolocaltime: use reentrant variant 32/236832/2
Karol Lewandowski [Mon, 22 Jun 2020 10:57:58 +0000 (12:57 +0200)]
localtime: use reentrant variant

configure was never setup up properly to support both legacy and reentrant
localtime, consequently legacy variant has been selected all the time.

This commit drops legacy variant leaving reentrant as the default.

Change-Id: Id502121a1197584621cb5b9d65b1c630f2a380f1

4 years agolibdlog: change license to MIT 25/236825/1
Yunmi Ha [Mon, 22 Jun 2020 09:00:17 +0000 (18:00 +0900)]
libdlog: change license to MIT

Change-Id: I3f43578a488cc6218a8c6191dca6bea8a739e76a
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
4 years agotests: padding test works on a large buffer 08/236508/5
Michal Bloch [Wed, 17 Jun 2020 14:05:05 +0000 (16:05 +0200)]
tests: padding test works on a large buffer

Some targets don't show incorrect behaviour when the message is
on the stack-allocated default buffer (of 512 size), only on
the backup heap-allocated buffer. Test there to catch those cases.

Change-Id: I7b674db3bf36aa1d0a88156b7f255494e59373c1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoClean up properly in the dlog_cpu script 03/236503/3
Mateusz Majewski [Wed, 17 Jun 2020 12:52:35 +0000 (14:52 +0200)]
Clean up properly in the dlog_cpu script

Change-Id: I3e25774123006daea442cc3bbcccaf7abf42db8a

4 years agoAdd padding tests for the pipe backend 89/236489/3
Mateusz Majewski [Wed, 17 Jun 2020 09:30:39 +0000 (11:30 +0200)]
Add padding tests for the pipe backend

Change-Id: I3ed63bf55e129f26af6a0418d3ea4a2390570686

4 years agoUse dlogutil builtin message count instead of head -n1 in tests 88/236488/3
Mateusz Majewski [Wed, 17 Jun 2020 09:30:10 +0000 (11:30 +0200)]
Use dlogutil builtin message count instead of head -n1 in tests

Change-Id: I1bb1f28e73a7e31e78f59e4d9411b6bbe53ac820

4 years agoSpec: remove "systemctl daemon-reload" 72/232172/3
INSUN PYO [Wed, 29 Apr 2020 01:47:59 +0000 (10:47 +0900)]
Spec: remove "systemctl daemon-reload"

Change-Id: I316717ed0cd79ed9799e1cd25bdb906f867e3d52

4 years agoPrecreate the dynamic config file 58/232458/2
Mateusz Majewski [Thu, 30 Apr 2020 13:36:19 +0000 (15:36 +0200)]
Precreate the dynamic config file

This makes it more explicit that a name is already in use.

Change-Id: Ifb2cde9be6c6616de23a6e7073b8586eede74e55

4 years ago(lib)dlogutil: getsize also returns current usage 89/226789/8 accepted/tizen/unified/20200617.055826 submit/tizen/20200616.113701
Michal Bloch [Thu, 5 Mar 2020 08:01:12 +0000 (09:01 +0100)]
(lib)dlogutil: getsize also returns current usage

Change-Id: Ie92967e0206761d833e1f2661cdd100291266407
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix infinite sleeps in low-log environments 83/235783/1
Michal Bloch [Tue, 9 Jun 2020 15:51:16 +0000 (17:51 +0200)]
Fix infinite sleeps in low-log environments

Change-Id: I3c3688d5bc05d648dfe2a38f349d2b403108a28a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMerge "Add current usage accessor to the daemon protocol" into tizen
Michal Bloch [Tue, 9 Jun 2020 11:47:09 +0000 (11:47 +0000)]
Merge "Add current usage accessor to the daemon protocol" into tizen

4 years agoMerge changes Icf47adb1,Iec35237c into tizen
Karol Lewandowski [Tue, 9 Jun 2020 11:46:04 +0000 (11:46 +0000)]
Merge changes Icf47adb1,Iec35237c into tizen

* changes:
  Remove another lie
  libdlogutil: allow sleeping forever

4 years agoAdd current usage accessor to the daemon protocol 24/233424/5
Agnieszka Baumann [Thu, 7 May 2020 09:16:52 +0000 (11:16 +0200)]
Add current usage accessor to the daemon protocol

Change-Id: Ia7446796068a8e06965fd6e8e44e416f1f066888

4 years agoClarify function names: getsize → get capacity 21/233421/5
Agnieszka Baumann [Thu, 14 May 2020 08:40:41 +0000 (10:40 +0200)]
Clarify function names: getsize → get capacity

Change-Id: I28955dd2359498370756555cbd88d6ff5a1fb7e1

4 years agoRemove another lie 47/235747/1
Mateusz Majewski [Tue, 9 Jun 2020 07:25:52 +0000 (09:25 +0200)]
Remove another lie

This time, I am the liar...

Change-Id: Icf47adb18ad1bd95ab4ecc16b51df200d829210a

4 years agolibdlogutil: allow sleeping forever 74/235674/1
Michal Bloch [Mon, 8 Jun 2020 18:43:32 +0000 (20:43 +0200)]
libdlogutil: allow sleeping forever

Change-Id: Iec35237c9a6ffbcf6b74f689675127617cbdddef
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoImprove server timestamp handling 33/234233/3
Mateusz Majewski [Fri, 22 May 2020 12:49:47 +0000 (14:49 +0200)]
Improve server timestamp handling

Change-Id: I2242f8ded640817cc7e627743056a37d0811bd38

4 years agoRename the test_libdlogutil.c file to ..._legacy.c 40/235540/2
Mateusz Majewski [Fri, 5 Jun 2020 09:46:26 +0000 (11:46 +0200)]
Rename the test_libdlogutil.c file to ..._legacy.c

The only purpose of this is to make the next commit kinda readable.

Change-Id: I3e0e6472df46f6ce40e5a2e08dd7592e09e6a8fd

4 years agoClean up: delete code that add and subtract zero 70/235470/2 accepted/tizen/unified/20200609.153542 submit/tizen/20200608.114627
INSUN PYO [Fri, 5 Jun 2020 00:45:19 +0000 (09:45 +0900)]
Clean up: delete code that add and subtract zero

Change-Id: I3f6b20601f8d964717857aa3e128515dd043938b

4 years agoMake all the files in the dynamic directory respected 31/232131/3
Mateusz Majewski [Tue, 28 Apr 2020 10:45:08 +0000 (12:45 +0200)]
Make all the files in the dynamic directory respected

Change-Id: Id1f881bc8a22169ada9df672d291f080d78df3b0

4 years agoFix garbage data in long-format strings 03/235303/2 submit/tizen/20200603.194620 submit/tizen/20200604.180558
Michal Bloch [Tue, 2 Jun 2020 15:56:23 +0000 (17:56 +0200)]
Fix garbage data in long-format strings

Change-Id: Ie271b8ca58f0cc018fb13b306f66f0fdf02af2e4
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoInitialize a value (fixes uninitialized access) 85/235185/2
Michal Bloch [Tue, 2 Jun 2020 11:09:28 +0000 (13:09 +0200)]
Initialize a value (fixes uninitialized access)

Change-Id: I1984ea4fe7c3ec1748d73ca546c8e550e31c9224
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRelease 6.0.12 89/234989/1 accepted/tizen/unified/20200603.150119 submit/tizen/20200601.123311
Michal Bloch [Mon, 1 Jun 2020 10:17:53 +0000 (12:17 +0200)]
Release 6.0.12

This release allows the use of hybrid mode on pipe backend.

Change-Id: I74a4144996b1a34798c704f83f482227a91bfdec
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix an ASAN complaint 33/234733/3
Mateusz Majewski [Thu, 28 May 2020 07:18:57 +0000 (09:18 +0200)]
Fix an ASAN complaint

Change-Id: I8a33a66a75162fb76d3994308545f2642ad921da

4 years agoImprove libdlogutil timeout handling 04/234904/2
Mateusz Majewski [Fri, 29 May 2020 13:00:03 +0000 (15:00 +0200)]
Improve libdlogutil timeout handling

The current (lib-internal so far) API allows one to specify how much one
should wait for logs. Sometimes however, we should perform actions
despite this. In such cases, we should limit the timeout to a maximum
value. This commit implements this. Also, it allows us to remove the
unneccessary 100 ms fixed timeout.

Change-Id: Ia9ae0872098847e79c60607438bbc2a9438b40f8

4 years agoAllow hybrid mode for pipe backend 45/233845/3 accepted/tizen/unified/20200529.124143 submit/tizen/20200527.060137 submit/tizen/20200528.103513
Michal Bloch [Tue, 12 May 2020 12:28:47 +0000 (14:28 +0200)]
Allow hybrid mode for pipe backend

Partially reverts 44238daabe075f5b0c4852c61cfb9ee7f269bf97.

Change-Id: I49f75475f9285c24fde4f473b5e767c4953535be
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: add socket connections to the socket epoll 44/233844/3
Mateusz Majewski [Mon, 18 May 2020 10:15:47 +0000 (12:15 +0200)]
logger: add socket connections to the socket epoll

Change-Id: I2ca5f500b02818454fa69c5ab4cfcfa4f8d3b3b9

4 years agologger: add sockets to epoll 56/233856/2
Michal Bloch [Fri, 8 May 2020 19:19:52 +0000 (21:19 +0200)]
logger: add sockets to epoll

Change-Id: Ie6d4b87f62948973b2c95b9d735eeb265f9430dc
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: fd entity manipulators work on epoll metadata 55/233855/2
Michal Bloch [Fri, 8 May 2020 16:10:05 +0000 (18:10 +0200)]
logger: fd entity manipulators work on epoll metadata

Change-Id: I26dab246c071bae6a6004ddc8516bf4e342f2ba2
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: handle the (empty) socket epoll instead of sleeping 54/233854/2
Michal Bloch [Thu, 7 May 2020 19:39:21 +0000 (21:39 +0200)]
logger: handle the (empty) socket epoll instead of sleeping

Change-Id: I666632213a1e99418a35ab5cde0d6ef1904e3650
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: add a (so far unused) epoll for socket FDs 53/233853/2
Michal Bloch [Thu, 7 May 2020 19:24:58 +0000 (21:24 +0200)]
logger: add a (so far unused) epoll for socket FDs

Change-Id: I87d93f99d4b76cf6759901822965d28964edcaa1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: bind epoll meta lifetime to logger 52/233852/2
Michal Bloch [Thu, 7 May 2020 19:16:47 +0000 (21:16 +0200)]
logger: bind epoll meta lifetime to logger

Change-Id: Ifddd234c30f215ac501faff550a24cea60838f07
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: extract epoll handling function 51/233851/2
Michal Bloch [Thu, 7 May 2020 19:03:08 +0000 (21:03 +0200)]
logger: extract epoll handling function

Change-Id: I67e37cdceeab3a65643c6f8fc5872fef25fea35a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: extract epoll metadata to a struct 50/233850/2
Michal Bloch [Thu, 7 May 2020 17:26:21 +0000 (19:26 +0200)]
logger: extract epoll metadata to a struct

Change-Id: Idaedf8407fdb24260ba66f7bf39455c883a52e3c
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: extract epoll dispatcher 49/233849/2
Michal Bloch [Thu, 7 May 2020 16:40:23 +0000 (18:40 +0200)]
logger: extract epoll dispatcher

Change-Id: I4202a56d7ee3b41ea9b2fe2c61d85112219ebff3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix a typo in Makefile 96/234196/1
Mateusz Majewski [Fri, 22 May 2020 10:51:32 +0000 (12:51 +0200)]
Fix a typo in Makefile

Change-Id: I8d382b0c620ffcb9a7e1373b550b1560c93f47bc

4 years agoMerge "logger: optimize reader time book-keeping" into tizen
Karol Lewandowski [Thu, 21 May 2020 19:49:15 +0000 (19:49 +0000)]
Merge "logger: optimize reader time book-keeping" into tizen

4 years agosort_vector divided into positive and negative tests 18/232318/4
Agnieszka Baumann [Thu, 16 Apr 2020 08:31:19 +0000 (10:31 +0200)]
sort_vector divided into positive and negative tests

Change-Id: Ibd6617f7d3e6d55deda7be859c33950d16734305

4 years agotests: logutil.c divided into positive and negative 65/232465/2
Agnieszka Baumann [Thu, 30 Apr 2020 16:32:32 +0000 (18:32 +0200)]
tests: logutil.c divided into positive and negative

Change-Id: I2f0c1078939005c8f95ec1cf36b2426d70347bba

4 years agoAdd CPU usage measurement 39/233839/2
Mateusz Majewski [Tue, 19 May 2020 10:31:35 +0000 (12:31 +0200)]
Add CPU usage measurement

Change-Id: I123a926433fd456e1860dd6cc9572a3ffe0e2d0c

4 years agologger: optimize reader time book-keeping 42/233842/1
Michal Bloch [Tue, 12 May 2020 12:51:09 +0000 (14:51 +0200)]
logger: optimize reader time book-keeping

Change-Id: I8449236f1c15261aa7550f175de1942b519ecbc1
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoApply lazy_polling_sleep_ms=100 86/233286/1
Hyotaek Shim [Wed, 13 May 2020 11:09:28 +0000 (20:09 +0900)]
Apply lazy_polling_sleep_ms=100

Change-Id: Ie2ce6ab2aae3b777306d19c9edac860a607e30ab
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
4 years agoHybrid mode config: only use for Android Logger backend 40/232440/3
Michal Bloch [Mon, 4 May 2020 10:49:54 +0000 (12:49 +0200)]
Hybrid mode config: only use for Android Logger backend

Change-Id: Ifaac28dd807262cc27d0b46f9bffa56e734085f3
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRevert "Revert "logger: introduce lazy/hybrid approach to early logging"" 39/232439/2
Michal Bloch [Mon, 4 May 2020 10:30:39 +0000 (12:30 +0200)]
Revert "Revert "logger: introduce lazy/hybrid approach to early logging""

This reverts commit 064c096da525adedf0766d0b91de16b011841676.

Change-Id: I2cf0fecf8437766fe774a4f702622e3d8c0d0109

4 years agoAdd secure logs test 66/232466/1 submit/tizen/20200506.124304
Mateusz Majewski [Mon, 4 May 2020 13:18:19 +0000 (15:18 +0200)]
Add secure logs test

Change-Id: I1157dae0c859b1b7b3e035e9c186efa553cc5aa8

4 years agoAdd secure log flag to dlogsend 54/232454/3
Mateusz Majewski [Mon, 4 May 2020 12:36:46 +0000 (14:36 +0200)]
Add secure log flag to dlogsend

Change-Id: I1dec52e921afdbbf5a0ff402d55516117f614cfd

4 years agoFix first secure log ignoring the config 60/232460/2
Michal Bloch [Tue, 5 May 2020 12:07:27 +0000 (14:07 +0200)]
Fix first secure log ignoring the config

Change-Id: Ifb575f0077fd35556e4263ef002535e274b95187
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agolibdlog: add `enable_secure_logs` config entry 21/232321/2
Michal Bloch [Thu, 30 Apr 2020 16:23:24 +0000 (18:23 +0200)]
libdlog: add `enable_secure_logs` config entry

If it is set to 0, __dlog_sec_print will just
return 0. Defaults to 1.

Change-Id: Ie3a00c5aa25bd4035444ae27383d649acf0e1d23
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoRevert "Revert "Fix a bottleneck in log processing"" 92/232392/2
Hyotaek Shim [Mon, 4 May 2020 06:22:25 +0000 (06:22 +0000)]
Revert "Revert "Fix a bottleneck in log processing""

This reverts commit 161899c8835dbacedde7eafc36cbc94725dffddb.

Change-Id: I92027e73240b32569572ad244cee50d0c452f155

4 years agoRevert "Revert "Move some more getters around"" 91/232391/2
Hyotaek Shim [Mon, 4 May 2020 06:15:56 +0000 (06:15 +0000)]
Revert "Revert "Move some more getters around""

This reverts commit 146458f9b77c55345efbb3419ee82e423c66e993.

Change-Id: I20602b26aa154a277a6735209036edb658a42569

4 years agoRevert "Fix a bottleneck in log processing" 87/232387/2 accepted/tizen/unified/20200504.040710 submit/tizen/20200504.040553
Hyotaek Shim [Mon, 4 May 2020 03:55:55 +0000 (03:55 +0000)]
Revert "Fix a bottleneck in log processing"

This reverts commit e2144aefea4b4091a4f653c59f0fc4aeecf7cb42.t

Change-Id: I3333f245fb836316b582ac0c82ad987dfde48c84

4 years agoRevert "logger: introduce lazy/hybrid approach to early logging" 83/232383/2
Hyotaek Shim [Mon, 4 May 2020 03:04:37 +0000 (03:04 +0000)]
Revert "logger: introduce lazy/hybrid approach to early logging"

This reverts commit 4fe8f45ca0edf377bc5ef4fde82346e45c1a1145.

Change-Id: I47e25decfb352b6534cce03af3eb85414be43f6f

4 years agoRevert "Move some more getters around" 84/232384/2 submit/tizen/20200504.032742
Hyotaek Shim [Mon, 4 May 2020 03:09:53 +0000 (03:09 +0000)]
Revert "Move some more getters around"

This reverts commit f97985fd478b5e8229d58e84620349889ad9cd69.

Change-Id: I2313ea90bc0213aade119d2aff5aca0173c8ae72

4 years agoMerge "Fix a mistake" into tizen
Michal Bloch [Thu, 30 Apr 2020 17:39:29 +0000 (17:39 +0000)]
Merge "Fix a mistake" into tizen

4 years agoFix a mistake 83/232283/1
Mateusz Majewski [Wed, 29 Apr 2020 15:09:56 +0000 (17:09 +0200)]
Fix a mistake

Oof!

Change-Id: Ia3a1f227645dce7b674792a6fee4298b50755703

4 years agoMake logctl lock the config file 80/232280/2
Mateusz Majewski [Wed, 29 Apr 2020 14:30:01 +0000 (16:30 +0200)]
Make logctl lock the config file

Somebody pointed out that, if two logctls are launched simultanously,
it may result in a race condition and one of the changes dropped. Our
minds quickly flocked to a solution in which we use exclusive locks to
lock the file on write. This means we will always see the file in a
consistent state.

Change-Id: I5062bdcddc6c880bfd11ec66dad9cc4927e0536b

4 years agoRewrite logctl to use open + fdopen instead of fopen 79/232279/2
Mateusz Majewski [Wed, 29 Apr 2020 14:18:39 +0000 (16:18 +0200)]
Rewrite logctl to use open + fdopen instead of fopen

Sounds useless, but allows us to avoid a hack in which we open the file
in append mode despite only ever intenting to read from it. Also, this
gives us access to the fd, which will prove useful in the future.

Change-Id: I8f2e32decf363e7bcc4c726d0f3eeedbe6c5ce4d

4 years agoRelease 6.0.11 18/232118/2 accepted/tizen/unified/20200429.032945 submit/tizen/20200428.114258 submit/tizen/20200429.062821
Michal Bloch [Tue, 28 Apr 2020 09:46:47 +0000 (11:46 +0200)]
Release 6.0.11

This realease brings the lazy polling mode as a solution to CPU usage.

Change-Id: I776d9163505b985e738c537b5e1e62e6da86bd0a
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agologger: introduce lazy/hybrid approach to early logging 41/230841/5
Michal Bloch [Wed, 22 Apr 2020 18:28:09 +0000 (20:28 +0200)]
logger: introduce lazy/hybrid approach to early logging

This mode is introduced in an attempt to limit CPU usage during boot time.
The logger will now wake up exactly after (instead of up to) the epoll delay
for some configurable amount of time (by default 10s). Ideally this would
just be waiting on BootingDone but the daemon doesn't handle DBus yet, which
would be a larger undertaking. After that delay, it switches back to usual
epoll behaviour (waking up on each log, limiting log loss).

Change-Id: I55555978902d18b2d922663a24fe1caeb6d330e8
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoFix a bottleneck in log processing 16/232116/1
Michal Bloch [Tue, 28 Apr 2020 09:19:32 +0000 (11:19 +0200)]
Fix a bottleneck in log processing

Change-Id: I64cd95f2f6d6f1ba8b9967e4978f43e02bfdb311
Signed-off-by: Michal Bloch <m.bloch@samsung.com>
4 years agoMove some more getters around 33/230833/3
Mateusz Majewski [Tue, 14 Apr 2020 11:05:13 +0000 (13:05 +0200)]
Move some more getters around

Change-Id: I99b1cfc0964be3658e3059102dc00f11fe89f701

4 years agoFix logger backend integration test 13/230213/5
Mateusz Majewski [Wed, 8 Apr 2020 12:39:35 +0000 (14:39 +0200)]
Fix logger backend integration test

When we wrote the test, we assumed that the size of the buffer on the
logger backend is constant. This assumption turned out to be naïve and
completely wrong; the buffer on the emulator is much smaller.

Change-Id: Ied05dc9930688108c727969fb189e5cd3fb739bf