8146800: Reorganize logging alias code

Logging alias code has been reorganized to use internal Unified Logging methods.

Reviewed-by: dholmes, hseigel, mlarsson, rprotacio
This commit is contained in:
Max Ockner 2016-01-13 14:56:17 -05:00
parent 380897b206
commit 45b28571f0
2 changed files with 38 additions and 32 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,6 +25,8 @@
#ifndef SHARE_VM_RUNTIME_ARGUMENTS_HPP
#define SHARE_VM_RUNTIME_ARGUMENTS_HPP
#include "logging/logLevel.hpp"
#include "logging/logTag.hpp"
#include "runtime/java.hpp"
#include "runtime/os.hpp"
#include "runtime/perfData.hpp"
@ -223,6 +225,14 @@ class AgentLibraryList VALUE_OBJ_CLASS_SPEC {
// Helper class for controlling the lifetime of JavaVMInitArgs objects.
class ScopedVMInitArgs;
// Most logging functions require 5 tags. Some of them may be _NO_TAG.
typedef struct {
const char* alias_name;
LogLevelType level;
bool exactMatch;
LogTagType tag;
} AliasedLoggingFlag;
class Arguments : AllStatic {
friend class VMStructs;
friend class JvmtiExport;
@ -449,7 +459,7 @@ class Arguments : AllStatic {
// Return NULL if the arg has expired.
static const char* handle_aliases_and_deprecation(const char* arg, bool warn);
static bool lookup_logging_aliases(const char* arg, char* buffer);
static AliasedLoggingFlag catch_logging_aliases(const char* name);
static short CompileOnlyClassesNum;
static short CompileOnlyClassesMax;
static char** CompileOnlyClasses;