File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
jdk.hotspot.agent/share/classes/sun/jvm/hotspot/runtime
test/hotspot/jtreg/serviceability/sa Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1997, 2019 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1997, 2021 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@ OSThread::~OSThread() {
3838
3939// Printing
4040void OSThread::print_on (outputStream *st) const {
41- st->print (" nid=0x%x " , thread_id ());
41+ st->print (" nid=" UINT64_FORMAT " " , ( uint64_t ) thread_id ());
4242 switch (_state) {
4343 case ALLOCATED: st->print (" allocated " ); break ;
4444 case INITIALIZED: st->print (" initialized " ); break ;
Original file line number Diff line number Diff line change @@ -487,7 +487,7 @@ public void printThreadInfoOn(PrintStream out){
487487 out .print (" tid=" );
488488 out .print (this .getAddress ());
489489 out .print (" nid=" );
490- out .print (String .format ("0x%x " ,this .getOSThread ().threadId ()));
490+ out .print (String .format ("%d " ,this .getOSThread ().threadId ()));
491491 out .print (getOSThread ().getThreadState ().getPrintVal ());
492492 out .print (" [" );
493493 if (this .getLastJavaSP () == null ){
Original file line number Diff line number Diff line change @@ -60,8 +60,9 @@ public static void main(String[] args) throws Exception {
6060 System .out .println (out .getStdout ());
6161 System .err .println (out .getStderr ());
6262
63- out .shouldMatch ("\" .+\" #\\ d+ daemon prio=\\ d+ tid=0x[0-9a-f]+ nid=0x[0-9a-f]+ .+ \\ [0x[0-9a-f]+]" );
64- out .shouldMatch ("\" main\" #\\ d+ prio=\\ d+ tid=0x[0-9a-f]+ nid=0x[0-9a-f]+ .+ \\ [0x[0-9a-f]+]" );
63+ // The character class \p{XDigit} matches any hexadecimal character.
64+ out .shouldMatch ("\" .+\" #\\ d+ daemon prio=\\ d+ tid=0x\\ p{XDigit}+ nid=\\ d+ .+ \\ [0x\\ p{XDigit}+]" );
65+ out .shouldMatch ("\" main\" #\\ d+ prio=\\ d+ tid=0x\\ p{XDigit}+ nid=\\ d+ .+ \\ [0x\\ p{XDigit}+]" );
6566 out .shouldMatch (" java.lang.Thread.State: .+" );
6667 out .shouldMatch (" JavaThread state: _thread_.+" );
6768
You can’t perform that action at this time.
0 commit comments