mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8153731: Increase max tag combinations for UL expression (config)
Reviewed-by: stefank, mlarsson
This commit is contained in:
parent
cf254af2fb
commit
e1a8c2d197
4 changed files with 19 additions and 2 deletions
|
@ -32,6 +32,8 @@
|
|||
#include "logging/log.hpp"
|
||||
#include "logging/logConfiguration.hpp"
|
||||
#include "logging/logOutput.hpp"
|
||||
#include "logging/logTagLevelExpression.hpp"
|
||||
#include "logging/logTagSet.hpp"
|
||||
#include "logging/logStream.inline.hpp"
|
||||
#include "memory/resourceArea.hpp"
|
||||
|
||||
|
@ -44,6 +46,13 @@
|
|||
#define assert_char_not_in(c, s) \
|
||||
assert(strchr(s, c) == NULL, "Expected '%s' to *not* contain character '%c'", s, c)
|
||||
|
||||
void Test_log_tag_combinations_limit() {
|
||||
assert(LogTagLevelExpression::MaxCombinations > LogTagSet::ntagsets(),
|
||||
"Combination limit (" SIZE_FORMAT ") not sufficient "
|
||||
"for configuring all available tag sets (" SIZE_FORMAT ")",
|
||||
LogTagLevelExpression::MaxCombinations, LogTagSet::ntagsets());
|
||||
}
|
||||
|
||||
class TestLogFile {
|
||||
private:
|
||||
char file_name[256];
|
||||
|
|
|
@ -36,9 +36,12 @@ class LogTagSet;
|
|||
// Class used to temporary encode a 'what'-expression during log configuration.
|
||||
// Consists of a combination of tags and levels, e.g. "tag1+tag2=level1,tag3*=level2".
|
||||
class LogTagLevelExpression : public StackObj {
|
||||
friend void LogConfiguration::configure_stdout(LogLevelType, bool, ...);
|
||||
public:
|
||||
static const size_t MaxCombinations = 256;
|
||||
|
||||
private:
|
||||
static const size_t MaxCombinations = 32;
|
||||
friend void LogConfiguration::configure_stdout(LogLevelType, bool, ...);
|
||||
|
||||
static const char* DefaultExpressionString;
|
||||
|
||||
size_t _ntags, _ncombinations;
|
||||
|
|
|
@ -64,6 +64,10 @@ class LogTagSet VALUE_OBJ_CLASS_SPEC {
|
|||
return _list;
|
||||
}
|
||||
|
||||
static size_t ntagsets() {
|
||||
return _ntagsets;
|
||||
}
|
||||
|
||||
LogTagSet* next() {
|
||||
return _next;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ void InternalVMTests::run() {
|
|||
run_unit_test(Test_linked_list);
|
||||
run_unit_test(TestChunkedList_test);
|
||||
run_unit_test(JSON_test);
|
||||
run_unit_test(Test_log_tag_combinations_limit);
|
||||
run_unit_test(Test_logtarget);
|
||||
run_unit_test(Test_logstream);
|
||||
run_unit_test(Test_loghandle);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue