[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Hoernchen has created a revert of this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-MessageType: revert


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Hoernchen has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..

logging: add log level cache

This ensures multithreaded logging attempts, in particular ones that do
nothing, do not hold the lock just for checking the level, which
interferes with other logging attempts.

Closes: OS#5818

Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
---
M include/osmocom/core/logging.h
M src/core/libosmocore.map
M src/core/logging.c
M src/vty/logging_vty.c
M tests/ctrl/ctrl_test.c
5 files changed, 138 insertions(+), 2 deletions(-)

Approvals:
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, but someone else must approve
  Hoernchen: Looks good to me, approved




diff --git a/include/osmocom/core/logging.h b/include/osmocom/core/logging.h
index e8433a1..e4859cd 100644
--- a/include/osmocom/core/logging.h
+++ b/include/osmocom/core/logging.h
@@ -409,7 +409,7 @@

 /* filter on the targets */
 void log_set_all_filter(struct log_target *target, int);
-
+void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level);
 void log_set_use_color(struct log_target *target, int);
 void log_set_print_extended_timestamp(struct log_target *target, int);
 void log_set_print_timestamp(struct log_target *target, int);
diff --git a/src/core/libosmocore.map b/src/core/libosmocore.map
index b66e37d..06a3864 100644
--- a/src/core/libosmocore.map
+++ b/src/core/libosmocore.map
@@ -58,6 +58,7 @@
 log_add_target;
 log_category_name;
 log_check_level;
+log_cache_update;
 log_del_target;
 log_enable_multithread;
 log_fini;
diff --git a/src/core/logging.c b/src/core/logging.c
index 6941f9b..906d664 100644
--- a/src/core/logging.c
+++ b/src/core/logging.c
@@ -93,6 +93,68 @@
 static __thread long int logging_tid;

 #if (!EMBEDDED)
+/*! One global copy that contains the union of log levels for all targets
+*  for all categories, used for quick lock free checks of log targets. */
+static volatile uint8_t *log_level_lookup_cache;
+
+/*! Updates cache for all targets for all categies, caller must hold 
osmo_log_tgt_mutex. */
+static void log_cache_update_all(void)
+{
+   struct log_target *tgt;
+   uint8_t tmp_en[osmo_log_info->num_cat];
+   uint8_t tmp_level[osmo_log_info->num_cat];
+   memset(tmp_en, 0, osmo_log_info->num_cat);
+   memset(tmp_level, UINT8_MAX, osmo_log_info->num_cat);
+
+   /* values can also decrease.. */
+   llist_for_each_entry(tgt, &osmo_log_target_list, entry) {
+   for (int i = 0; i < osmo_log_info->num_cat; i++) {
+   struct log_category *cat = &tgt->categories[i];
+   tmp_en[i] = OSMO_MAX(tmp_en[i], cat->enabled);
+   tmp_level[i] = OSMO_MIN(tmp_level[i], cat->loglevel);
+   tmp_level[i] = tgt->loglevel ? OSMO_MIN(tmp_level[i], 
tgt->loglevel) : tmp_level[i];
+   }
+   }
+
+   for (int i = 0; i < osmo_log_info->num_cat; i++)
+   log_level_lookup_cache[i] = tmp_en[i] ? tmp_level[i] : 
UINT8_MAX;
+}
+
+/*! Updates single cache entry, caller must hold osmo_log_tgt_mutex.
+ *
+ *  \param[in] mapped_subsys plain category index (after mapping)
+ *  \param[in] enabled log category enabled?
+ *  \param[in] level log level
+ */
+void log_cache_update(int mapped_subsys, uint8_t enabled, uint8_t level)
+{
+   struct log_target *tgt;
+   struct log_category tmp = { UINT8_MAX, 0 };
+
+   /* values can also decrease.. */
+   llist_for_each_entry(tgt, &osmo_log_target_list, entry) {
+   struct log_category *cat = &tgt->categories[mapped_subsys];
+   tmp.enabled = OSMO_MAX(tmp.enabled, cat->enabled);
+   tmp.loglevel = OSMO_MIN(tmp.loglevel, cat->loglevel);
+   tmp.loglevel = tgt->loglevel ? OSMO_MIN(tmp.loglevel, 
tgt->loglevel) : tmp.loglevel;
+   }
+   tmp.enabled = OSMO_MAX(tmp.enabled, enabled);
+   tmp.loglevel = OSMO_MIN(tmp.loglevel, level);
+
+   log_level_lookup_cache[mapped_subsys] = tmp.enabled ? tmp.loglevel : 
UINT8_MAX;
+}
+
+/*! Queries log level cache.
+ *
+ *  \param[in] mapped_subsys plain category index (after mapping)
+ *  \param[in] level log level
+ *  \returns true if logging should happen for at least one log target
+*/
+static bool log_cache_check(int mapped_subsys, int level)
+{
+   return (level < log_level_lookup_cache[mapped_subsys]) ? false : true;
+}
+
 /*! This mutex must be held while using osmo_log_target_list or any of its
   log_targets in a multithread program. Prevents race conditions between 
threads
   like producing unordered timestamps or VTY deleting a target while another
@@ -426,6 +488,10 @@
}
} while ((category_token = strtok(NULL, ":")));

+#if !defined(EMBEDDED)
+   log_cache_update_all();
+#endif
+

[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Attention is currently required from: arehbein.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 15: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Tue, 09 Jan 2024 16:07:37 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread fixeria
Attention is currently required from: Hoernchen, arehbein.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 15: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Tue, 09 Jan 2024 16:05:49 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread laforge
Attention is currently required from: Hoernchen, arehbein, fixeria.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 15: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: arehbein 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 09 Jan 2024 15:48:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread Hoernchen
Attention is currently required from: arehbein, fixeria, laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 15:

(3 comments)

Patchset:

PS9:
> how often do you still want me to ping you, @ewild@sysmocom. […]
Done


File src/core/logging.c:

https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/1797363d_329bd809
PS12, Line 153: logging
> I would suggest […]
Done


https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/297a0f7e_72ee505b
PS12, Line 1557:talloc_free(osmo_log_info);
> do `osmo_log_info = NULL` like below?
Done



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 15
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: arehbein 
Gerrit-Attention: laforge 
Gerrit-Attention: fixeria 
Gerrit-Comment-Date: Tue, 09 Jan 2024 15:29:07 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Comment-In-Reply-To: fixeria 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2024-01-09 Thread laforge
Attention is currently required from: Hoernchen, arehbein.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 12:

(1 comment)

Patchset:

PS9:
> ping? yet another month has more than passed. @ewild@sysmocom. […]
how often do you still want me to ping you, @ew...@sysmocom.de ?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 12
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Tue, 09 Jan 2024 13:11:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-12-17 Thread laforge
Attention is currently required from: Hoernchen, arehbein.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 12:

(1 comment)

Patchset:

PS9:
> UINT8_MAX would be fine with me.
ping? yet another month has more than passed. @ew...@sysmocom.de Can you please 
finally amend the patch so we can merge it?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 12
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Sun, 17 Dec 2023 13:12:42 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-11-07 Thread laforge
Attention is currently required from: Hoernchen, arehbein.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 12:

(1 comment)

Patchset:

PS9:
> If it's about not introducing a new define... […]
UINT8_MAX would be fine with me.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 12
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: arehbein 
Gerrit-Comment-Date: Tue, 07 Nov 2023 11:18:41 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: arehbein 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-11-06 Thread arehbein
Attention is currently required from: Hoernchen, laforge.

arehbein has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email )

Change subject: logging: add log level cache
..


Patch Set 12:

(2 comments)

Patchset:

PS9:
> Ping, another month has passed?
If it's about not introducing a new define... can we not use `UINT8_MAX`? With 
this it's also quite clear that we can't get any higher number (from what I can 
tell, internally log levels are always stored as `uint8_t`; 
`log_cache_update()` also takes `uint8_t` for its level argument)


File src/core/logging.c:

https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/85774041_2c819416
PS12, Line 153: logging
I would suggest

> if logging should happen for at least one log target



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 12
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: arehbein 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Mon, 06 Nov 2023 23:28:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-06-23 Thread fixeria
Attention is currently required from: Hoernchen, laforge.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633 )

Change subject: logging: add log level cache
..


Patch Set 12:

(1 comment)

File src/core/logging.c:

https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/0e3fe6b6_67164345
PS12, Line 1557:talloc_free(osmo_log_info);
do `osmo_log_info = NULL` like below?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 12
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: fixeria 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Fri, 23 Jun 2023 10:50:45 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-06-11 Thread laforge
Attention is currently required from: Hoernchen.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633 )

Change subject: logging: add log level cache
..


Patch Set 12:

(1 comment)

Patchset:

PS9:
> so that IMHO means there's basically two ways forward:  You replace all 
> instances of the magic 100 w […]
Ping, another month has passed?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 12
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Sun, 11 Jun 2023 19:38:40 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-05-10 Thread laforge
Attention is currently required from: Hoernchen.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633 )

Change subject: logging: add log level cache
..


Patch Set 11:

(1 comment)

Patchset:

PS9:
> Pong. […]
so that IMHO means there's basically two ways forward:  You replace all 
instances of the magic 100 with a self-explanatory #define, or you wait until 
somebdoy else will do that for you to move the patch ahead.  If that #define 
will get put next to the log levels (below LOGL_FATAL) it is less likely that 
somebody else will come up with some other magic high log-level that is above 
100 and breaks your logic.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 11
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Wed, 10 May 2023 12:31:35 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Hoernchen 
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-03-22 Thread Hoernchen
Attention is currently required from: Hoernchen, laforge.

Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/30633

to look at the new patch set (#11).

Change subject: logging: add log level cache
..

logging: add log level cache

This ensures multithreaded logging attempts, in particular ones that do
nothing, do not hold the lock just for checking the level, which
interferes with other logging attempts.

Closes: OS#5818

Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
---
M include/osmocom/core/logging.h
M src/core/libosmocore.map
M src/core/logging.c
M src/vty/logging_vty.c
M tests/ctrl/ctrl_test.c
5 files changed, 139 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/30633/11
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 11
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[M] Change in libosmocore[master]: logging: add log level cache

2023-03-22 Thread Jenkins Builder
Attention is currently required from: laforge.

Jenkins Builder has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633 )

Change subject: logging: add log level cache
..


Patch Set 10:

(1 comment)

File src/core/logging.c:

Robot Comment from checkpatch (run ID jenkins-gerrit-lint-5332):
https://gerrit.osmocom.org/c/libosmocore/+/30633/comment/f7787d70_d4083f28
PS10, Line 120: for (int i = 0; i < osmo_log_info->num_cat; i++) {
braces {} are not necessary for single statement blocks



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 10
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 22 Mar 2023 12:55:12 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-03-22 Thread Hoernchen
Attention is currently required from: laforge.

Hello Jenkins Builder, laforge,

I'd like you to reexamine a change. Please visit

https://gerrit.osmocom.org/c/libosmocore/+/30633

to look at the new patch set (#10).

Change subject: logging: add log level cache
..

logging: add log level cache

This ensures multithreaded logging attempts, in particular ones that do
nothing, do not hold the lock just for checking the level, which
interferes with other logging attempts.

Closes: OS#5818

Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
---
M include/osmocom/core/logging.h
M src/core/logging.c
M src/vty/logging_vty.c
M tests/ctrl/ctrl_test.c
4 files changed, 139 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/33/30633/10
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 10
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-MessageType: newpatchset


[M] Change in libosmocore[master]: logging: add log level cache

2023-03-22 Thread Hoernchen
Attention is currently required from: laforge.

Hoernchen has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633 )

Change subject: logging: add log level cache
..


Patch Set 9:

(1 comment)

Patchset:

PS9:
> ping?
Pong.

There is nothing to resolve here as far as I am concerned, the comment above 
the single line that apparently warrants lengthy discussion clearly says: /* 
init with invalid high level */ - and that's it.



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 9
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: laforge 
Gerrit-Comment-Date: Wed, 22 Mar 2023 12:44:01 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge 
Gerrit-MessageType: comment


[M] Change in libosmocore[master]: logging: add log level cache

2023-03-22 Thread laforge
Attention is currently required from: Hoernchen.

laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/30633 )

Change subject: logging: add log level cache
..


Patch Set 9:

(1 comment)

Patchset:

PS9:
ping?



--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30633
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I35f8dd9127dd6e7feae392094fd6b3ce2d32558d
Gerrit-Change-Number: 30633
Gerrit-PatchSet: 9
Gerrit-Owner: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-CC: pespin 
Gerrit-Attention: Hoernchen 
Gerrit-Comment-Date: Wed, 22 Mar 2023 12:14:47 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment