Skip to content
Permalink
Browse files

Merge

  • Loading branch information
JesperIRL committed Dec 17, 2019
2 parents e16d4a4 + 4778cbb commit fa070554cb29d44e06b1bf711f5fc0401ed2d266
@@ -37,7 +37,11 @@
#include "runtime/os.hpp"
#include "utilities/macros.hpp"

static const char* Indents[5] = {"", " ", " ", " ", " "};
static const char* indent(uint level) {
static const char* Indents[] = {"", " ", " ", " ", " ", " "};
assert(level < ARRAY_SIZE(Indents), "Too high indent level %u", level);
return Indents[level];
}

G1GCPhaseTimes::G1GCPhaseTimes(STWGCTimer* gc_timer, uint max_gc_threads) :
_max_gc_threads(max_gc_threads),
@@ -299,26 +303,26 @@ size_t G1GCPhaseTimes::sum_thread_work_items(GCParPhases phase, uint index) {
}

template <class T>
void G1GCPhaseTimes::details(T* phase, const char* indent) const {
void G1GCPhaseTimes::details(T* phase, const char* indent_str) const {
LogTarget(Trace, gc, phases, task) lt;
if (lt.is_enabled()) {
LogStream ls(lt);
ls.print("%s", indent);
ls.print("%s", indent_str);
phase->print_details_on(&ls);
}
}

void G1GCPhaseTimes::log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum) const {
out->print("%s", Indents[indent]);
void G1GCPhaseTimes::log_phase(WorkerDataArray<double>* phase, uint indent_level, outputStream* out, bool print_sum) const {
out->print("%s", indent(indent_level));
phase->print_summary_on(out, print_sum);
details(phase, Indents[indent]);
details(phase, indent(indent_level));

for (uint i = 0; i < phase->MaxThreadWorkItems; i++) {
WorkerDataArray<size_t>* work_items = phase->thread_work_items(i);
if (work_items != NULL) {
out->print("%s", Indents[indent + 1]);
out->print("%s", indent(indent_level + 1));
work_items->print_summary_on(out, true);
details(work_items, Indents[indent + 1]);
details(work_items, indent(indent_level + 1));
}
}
}
@@ -343,11 +347,11 @@ void G1GCPhaseTimes::trace_phase(WorkerDataArray<double>* phase, bool print_sum,
#define TIME_FORMAT "%.1lfms"

void G1GCPhaseTimes::info_time(const char* name, double value) const {
log_info(gc, phases)("%s%s: " TIME_FORMAT, Indents[1], name, value);
log_info(gc, phases)("%s%s: " TIME_FORMAT, indent(1), name, value);
}

void G1GCPhaseTimes::debug_time(const char* name, double value) const {
log_debug(gc, phases)("%s%s: " TIME_FORMAT, Indents[2], name, value);
log_debug(gc, phases)("%s%s: " TIME_FORMAT, indent(2), name, value);
}

void G1GCPhaseTimes::debug_time_for_reference(const char* name, double value) const {
@@ -356,19 +360,19 @@ void G1GCPhaseTimes::debug_time_for_reference(const char* name, double value) co

if (lt.is_enabled()) {
LogStream ls(lt);
ls.print_cr("%s%s: " TIME_FORMAT, Indents[2], name, value);
ls.print_cr("%s%s: " TIME_FORMAT, indent(2), name, value);
} else if (lt2.is_enabled()) {
LogStream ls(lt2);
ls.print_cr("%s%s: " TIME_FORMAT, Indents[2], name, value);
ls.print_cr("%s%s: " TIME_FORMAT, indent(2), name, value);
}
}

void G1GCPhaseTimes::trace_time(const char* name, double value) const {
log_trace(gc, phases)("%s%s: " TIME_FORMAT, Indents[3], name, value);
log_trace(gc, phases)("%s%s: " TIME_FORMAT, indent(3), name, value);
}

void G1GCPhaseTimes::trace_count(const char* name, size_t value) const {
log_trace(gc, phases)("%s%s: " SIZE_FORMAT, Indents[3], name, value);
log_trace(gc, phases)("%s%s: " SIZE_FORMAT, indent(3), name, value);
}

double G1GCPhaseTimes::print_pre_evacuate_collection_set() const {
@@ -195,10 +195,10 @@ class G1GCPhaseTimes : public CHeapObj<mtGC> {
void reset();

template <class T>
void details(T* phase, const char* indent) const;
void details(T* phase, const char* indent_str) const;

void log_work_items(WorkerDataArray<double>* phase, uint indent, outputStream* out) const;
void log_phase(WorkerDataArray<double>* phase, uint indent, outputStream* out, bool print_sum) const;
void log_phase(WorkerDataArray<double>* phase, uint indent_level, outputStream* out, bool print_sum) const;
void debug_serial_phase(WorkerDataArray<double>* phase, uint extra_indent = 0) const;
void debug_phase(WorkerDataArray<double>* phase, uint extra_indent = 0) const;
void trace_phase(WorkerDataArray<double>* phase, bool print_sum = true, uint extra_indent = 0) const;
@@ -95,10 +95,7 @@ public Result authenticate (HttpExchange t)
*/
String auth = rmap.getFirst ("Authorization");
if (auth == null) {
Headers map = t.getResponseHeaders();
var authString = "Basic realm=" + "\"" + realm + "\"" +
(isUTF8 ? " charset=\"UTF-8\"" : "");
map.set ("WWW-Authenticate", authString);
setAuthHeader(t);
return new Authenticator.Retry (401);
}
int sp = auth.indexOf (' ');
@@ -119,13 +116,18 @@ public Result authenticate (HttpExchange t)
);
} else {
/* reject the request again with 401 */

Headers map = t.getResponseHeaders();
map.set ("WWW-Authenticate", "Basic realm=" + "\""+realm+"\"");
setAuthHeader(t);
return new Authenticator.Failure(401);
}
}

private void setAuthHeader(HttpExchange t) {
Headers map = t.getResponseHeaders();
var authString = "Basic realm=" + "\"" + realm + "\"" +
(isUTF8 ? ", charset=\"UTF-8\"" : "");
map.set ("WWW-Authenticate", authString);
}

/**
* called for each incoming request to verify the
* given name and password in the context of this
@@ -71,7 +71,7 @@ requires.properties= \
test.vm.gc.nvdimm

# Minimum jtreg version
requiredVersion=4.2 b14
requiredVersion=4.2 b16

# Path to libraries in the topmost test directory. This is needed so @library
# does not need ../../../ notation to reach them
@@ -23,7 +23,7 @@ modules=java.xml
groups=TEST.groups

# Minimum jtreg version
requiredVersion=4.2 b13
requiredVersion=4.2 b16

# Path to libraries in the topmost test directory. This is needed so @library
# does not need ../../ notation to reach them
@@ -59,7 +59,7 @@ requires.properties= \
release.implementor

# Minimum jtreg version
requiredVersion=4.2 b14
requiredVersion=4.2 b16

# Path to libraries in the topmost test directory. This is needed so @library
# does not need ../../ notation to reach them
@@ -32,7 +32,7 @@

/**
* @test
* @bug 8199849
* @bug 8199849 8235976
* @summary
* @library /test/lib
* @run main/othervm ParamTest
@@ -42,10 +42,10 @@
public class ParamTest {

static final String[] variants = {
" charset=utf-8",
" charset=UtF-8",
" charset=\"utF-8\"",
" charset=\"UtF-8\""
" ,charset=utf-8",
" ,charset=UtF-8",
" ,charset=\"utF-8\"",
" ,charset=\"UtF-8\""
};

static final int LOOPS = variants.length;
@@ -15,7 +15,7 @@ keys=intermittent randomness
groups=TEST.groups

# Minimum jtreg version
requiredVersion=4.2 b14
requiredVersion=4.2 b16

# Use new module options
useNewOptions=true
@@ -8,7 +8,7 @@ keys=intermittent randomness
groups=TEST.groups

# Minimum jtreg version
requiredVersion=4.2 b14
requiredVersion=4.2 b16

# Use new module options
useNewOptions=true

0 comments on commit fa07055

Please sign in to comment.