mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +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/log.hpp"
|
||||||
#include "logging/logConfiguration.hpp"
|
#include "logging/logConfiguration.hpp"
|
||||||
#include "logging/logOutput.hpp"
|
#include "logging/logOutput.hpp"
|
||||||
|
#include "logging/logTagLevelExpression.hpp"
|
||||||
|
#include "logging/logTagSet.hpp"
|
||||||
#include "logging/logStream.inline.hpp"
|
#include "logging/logStream.inline.hpp"
|
||||||
#include "memory/resourceArea.hpp"
|
#include "memory/resourceArea.hpp"
|
||||||
|
|
||||||
|
@ -44,6 +46,13 @@
|
||||||
#define assert_char_not_in(c, s) \
|
#define assert_char_not_in(c, s) \
|
||||||
assert(strchr(s, c) == NULL, "Expected '%s' to *not* contain character '%c'", s, c)
|
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 {
|
class TestLogFile {
|
||||||
private:
|
private:
|
||||||
char file_name[256];
|
char file_name[256];
|
||||||
|
|
|
@ -36,9 +36,12 @@ class LogTagSet;
|
||||||
// Class used to temporary encode a 'what'-expression during log configuration.
|
// 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".
|
// Consists of a combination of tags and levels, e.g. "tag1+tag2=level1,tag3*=level2".
|
||||||
class LogTagLevelExpression : public StackObj {
|
class LogTagLevelExpression : public StackObj {
|
||||||
friend void LogConfiguration::configure_stdout(LogLevelType, bool, ...);
|
public:
|
||||||
|
static const size_t MaxCombinations = 256;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const size_t MaxCombinations = 32;
|
friend void LogConfiguration::configure_stdout(LogLevelType, bool, ...);
|
||||||
|
|
||||||
static const char* DefaultExpressionString;
|
static const char* DefaultExpressionString;
|
||||||
|
|
||||||
size_t _ntags, _ncombinations;
|
size_t _ntags, _ncombinations;
|
||||||
|
|
|
@ -64,6 +64,10 @@ class LogTagSet VALUE_OBJ_CLASS_SPEC {
|
||||||
return _list;
|
return _list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static size_t ntagsets() {
|
||||||
|
return _ntagsets;
|
||||||
|
}
|
||||||
|
|
||||||
LogTagSet* next() {
|
LogTagSet* next() {
|
||||||
return _next;
|
return _next;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,6 +67,7 @@ void InternalVMTests::run() {
|
||||||
run_unit_test(Test_linked_list);
|
run_unit_test(Test_linked_list);
|
||||||
run_unit_test(TestChunkedList_test);
|
run_unit_test(TestChunkedList_test);
|
||||||
run_unit_test(JSON_test);
|
run_unit_test(JSON_test);
|
||||||
|
run_unit_test(Test_log_tag_combinations_limit);
|
||||||
run_unit_test(Test_logtarget);
|
run_unit_test(Test_logtarget);
|
||||||
run_unit_test(Test_logstream);
|
run_unit_test(Test_logstream);
|
||||||
run_unit_test(Test_loghandle);
|
run_unit_test(Test_loghandle);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue