Use new Logger API (use Logger severityXXX instead of symbols)
Changed severity of several statements to either debug or trace (such as class loading)
(grafted from 95546475ae6e68ed81297a9f2101ad4efbcd9a4a)
--- a/Java.st Wed Feb 25 19:45:09 2015 +0100
+++ b/Java.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#Java
instanceVariableNames:''
classVariableNames:'Classes UnresolvedClassRefs Release BootBundle ClassPath
@@ -500,7 +504,7 @@
threadsToKill notEmptyOrNil ifTrue: [
Logger
log: 'Killing ' , threadsToKill size printString , ' java processes'
- severity: #info
+ severity:Logger severityDEBUG
facility: #JVM.
semaphore := Semaphore new: 1 - threadsToKill size.
semaphore name: 'Java thread killer'.
@@ -511,7 +515,7 @@
addExitAction: [
Logger
log: 'Java thread killed successfully'
- severity: #info
+ severity: Logger severityDEBUG
facility: #JVM.
semaphore signal
].
@@ -522,7 +526,7 @@
JavaVM releaseAllMonitors.
Logger
log: 'No Java threads running at this point'
- severity: #info
+ severity: Logger severityDEBUG
facility: #JVM.
"
@@ -531,7 +535,7 @@
"Created: / 26-08-1997 / 19:57:40 / cg"
"Modified: / 24-12-1999 / 02:34:53 / cg"
"Modified: / 17-11-2011 / 21:31:14 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 18-09-2014 / 13:55:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:10:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Java class methodsFor:'debugging'!
@@ -1160,7 +1164,7 @@
someObject setMethodDictionary: (MethodDictionary new).
Logger
log: 'flushing ' , someObject fullName
- severity: #info
+ severity: Logger severityDEBUG
facility: 'JVM'.
]
].
@@ -1187,7 +1191,7 @@
"Modified: / 06-11-2001 / 09:49:37 / cg"
"Modified: / 02-11-2011 / 21:34:13 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 17-12-2014 / 13:31:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:11:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
flushClasses
--- a/JavaClassReader.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaClassReader.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#JavaClassReader
instanceVariableNames:'inStream msb constants majorVsn minorVsn constNeeds2Slots
constSlot classBeingLoaded classLoader attributes'
@@ -132,6 +136,7 @@
"Created: 3.8.1997 / 18:17:21 / cg"
! !
+
!JavaClassReader class methodsFor:'constants'!
fileMajorVersions
@@ -279,13 +284,13 @@
cls notNil ifTrue:[
Logger
log: 'loaded class ' , cls displayString
- severity: #info
+ severity: Logger severityTRACE
facility: 'JVM'.
].
^cls.
"Created: / 07-02-2013 / 14:34:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 08-02-2013 / 01:20:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:08:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
readFile:aFilename ignoring:classesBeingLoaded
@@ -299,7 +304,7 @@
JavaVM commonOpenStreamUsing:[ inStream := aFilename asFilename readStream ]
] on:StreamError do:[:ex |
Logger
- log:('cannot read .class file: ' , ex description) severity:#error facility:'JVM'.
+ log:('cannot read .class file: ' , ex description) severity:Logger severityERROR facility:'JVM'.
self breakPoint: #jv.
^ nil
].
@@ -313,7 +318,7 @@
"Created: / 15-04-1996 / 14:58:53 / cg"
"Modified: / 09-05-1998 / 01:44:24 / cg"
"Modified: / 14-08-2012 / 02:17:26 / jv"
- "Modified: / 29-03-2013 / 23:54:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:08:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
readStream: aStream
@@ -354,11 +359,12 @@
javaClass := JavaClassReader new readStream: stream loader: classloader ignoring: classesBeingLoaded.
Logger
log: 'loaded class ' , javaClass displayString
- severity: #info
+ severity: Logger severityTRACE
facility: 'JVM'.
^ javaClass.
"Created: / 02-05-2013 / 09:50:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:08:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaClassReader class methodsFor:'obsolete'!
@@ -2449,15 +2455,14 @@
m setAccessFlags:access_flags.
m setJavaClass:aJavaClass.
tooManyArgs := false.
- ArgumentError handle:[:ex |
- Logger log: 'java method has too many arguments - will fail to execute' severity: #warn facility: 'JVM'.
+ [
+ m setName:name descriptor:descriptor.
+ ] on: ArgumentError do:[:ex |
+ Logger log: 'java method has too many arguments - will fail to execute' severity: Logger severityWARN facility: 'JVM'.
tooManyArgs := true.
ex proceed.
- ] do:[
- m setName:name descriptor:descriptor.
].
-
self readAttributesFor:m.
tooManyArgs ifTrue:[
@@ -2508,6 +2513,7 @@
"
"Created: / 21-05-2014 / 15:58:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:09:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
readMethodsFor:aJavaClass
@@ -2671,10 +2677,10 @@
!JavaClassReader methodsFor:'logging'!
info: message
- Verbose ifTrue: [ Logger log: message severity: #info facility: 'JVM' ].
+ Verbose ifTrue: [ Logger log: message severity: Logger severityINFO facility: 'JVM' ].
"Created: / 18-05-2011 / 15:06:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified (format): / 14-09-2011 / 21:39:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:10:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaClassReader class methodsFor:'documentation'!
--- a/JavaClassRegistry.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaClassRegistry.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
JavaClassEnvironment subclass:#JavaClassRegistry
instanceVariableNames:'vm loaders notifier lock'
classVariableNames:''
@@ -241,7 +245,7 @@
javaClass isNil ifTrue: [
Logger
log: 'JavaClassReader was not able to read given data stream'
- severity: #warn
+ severity: Logger severityWARN
facility: #JVM.
self breakPoint: #mh.
^ nil.
@@ -251,7 +255,7 @@
self registerClass: javaClass.
^ javaClass
- "Modified: / 02-05-2013 / 09:55:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:07:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaClassRegistry methodsFor:'enumerating'!
@@ -626,6 +630,6 @@
!
version_SVN
- ^ '§Id§'
+ ^ '§Id§'
! !
--- a/JavaContext.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaContext.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Context variableSubclass:#JavaContext
instanceVariableNames:'exArg exPC byteCode constPool acqrMonitors'
classVariableNames:''
@@ -410,7 +414,7 @@
Logger
log: ('removeMonitor: called but no monitors in acqrMonitors (%1)'
bindWith: self)
- severity: #warn
+ severity: Logger severityWARN
facility: #JVM.
self breakPoint: #mh.
^ self.
@@ -422,7 +426,7 @@
Logger
log: ('removeMonitor: called but no such monitor in acqrMonitors (%1)'
bindWith: self)
- severity: #warn
+ severity: Logger severityWARN
facility: #JVM.
self breakPoint: #mh.
^ self.
@@ -430,8 +434,8 @@
acqrMonitors isEmpty ifTrue: [self unmarkForUnwind].
"Created: / 08-11-2011 / 14:19:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 08-11-2011 / 21:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 17-11-2011 / 19:14:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:07:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaContext methodsFor:'exception handler support'!
--- a/JavaEmbeddedFrameView.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaEmbeddedFrameView.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
JavaView subclass:#JavaEmbeddedFrameView
instanceVariableNames:'codeURL codeBaseURL documentURL archiveURL parameterDictionary
embeddedAppletFrame applet appletID appletThread
@@ -378,7 +382,7 @@
appletThread notNil ifTrue:[
appletThread terminateAllSubprocesses.
].
- Logger log:'JAVA applet startup finished' severity: #info facility: 'JVM'
+ Logger log:'JAVA applet startup finished' severity: Logger severityDEBUG facility: 'JVM'
]
]
]
@@ -393,7 +397,7 @@
"Created: / 28-01-1998 / 21:30:32 / cg"
"Modified: / 24-12-1999 / 02:58:50 / cg"
- "Modified: / 14-09-2011 / 21:40:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:07:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
stopApplet
@@ -424,13 +428,13 @@
].
appletThread isDead ifFalse:[
"/ after 3 seconds, kill it.
- Logger log:'EmbeddedAppletFrame: JAVA thread did not stop - soft terminate ...' severity: #info facility: 'JVM'.
+ Logger log:'EmbeddedAppletFrame: JAVA thread did not stop - soft terminate ...' severity: Logger severityDEBUG facility: 'JVM'.
appletThread == JavaVM javaScreenUpdaterThread ifTrue:[self halt].
appletThread == JavaVM javaEventQueueThread ifTrue:[self halt].
appletThread terminate.
n2 := n2 + 1.
n2 > 3 ifTrue:[
- Logger log:'EmbeddedAppletFrame: JAVA thread did not stop - shooting down ...' severity: #info facility: 'JVM'.
+ Logger log:'EmbeddedAppletFrame: JAVA thread did not stop - shooting down ...' severity: Logger severityDEBUG facility: 'JVM'.
appletThread terminateNoSignal
]
].
@@ -439,7 +443,7 @@
appletThread := nil
"Modified: / 24-12-1999 / 02:35:25 / cg"
- "Modified: / 14-09-2011 / 21:42:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:07:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaEmbeddedFrameView methodsFor:'initialize / release'!
--- a/JavaMonitor.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaMonitor.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#JavaMonitor
instanceVariableNames:'owningProcess processesEntered monitorSema count waitingSema
processesWaiting waitEnabled ownerPrintString'
@@ -125,12 +129,12 @@
disableWait
JavaVM monitorTrace ifTrue:[
- Logger log: ('Waiting is disabled on monitor for %1' bindWith: ownerPrintString) severity:#debug facility:#JVM.
+ Logger log: ('Waiting is disabled on monitor for %1' bindWith: ownerPrintString) severity:Logger severityDEBUG facility:#JVM.
].
instVarAccess critical: [ waitEnabled := false ].
"Created: / 30-11-2011 / 20:34:40 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 11-10-2013 / 11:17:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
enableWait
@@ -306,14 +310,14 @@
Logger
log: ('%1: notifying %2 processes' bindWith: thisProcess printString
with: processesWaiting size)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
waitingSema signal.
Processor yield.
"Created: / 22-11-2011 / 12:14:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 11-10-2013 / 11:16:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
notifyAll
@@ -326,14 +330,14 @@
Logger
log: ('%1: notifying all %2 processes' bindWith: thisProcess printString
with: processesWaiting size)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
waitingSema signalForAll.
Processor yield.
"Created: / 22-11-2011 / 12:14:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 11-10-2013 / 11:16:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
release
@@ -376,7 +380,7 @@
log: ('%1 wanted to go to sleep, but it cant, this monitor is for %2 which is already dead'
bindWith: thisProcess printString
with: ownerPrintString)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
^ self.
@@ -411,7 +415,7 @@
"Created: / 22-11-2011 / 12:52:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 01-12-2011 / 10:57:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 22-10-2013 / 14:31:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaMonitor methodsFor:'queries'!
--- a/JavaNameAndType2.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaNameAndType2.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#JavaNameAndType2
instanceVariableNames:'constantPool nameIndex descriptorIndex nameCache descriptorCache'
classVariableNames:''
@@ -159,18 +163,18 @@
info: arg
- Logger log: arg severity: #info facility: 'JVM'
+ Logger log: arg severity: Logger severityINFO facility: 'JVM'
"Created: / 10-05-2011 / 16:50:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 14-09-2011 / 21:42:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
warning: arg
- Logger log: arg severity: #warn facility: 'JVM'
+ Logger log: arg severity: Logger severityWARN facility: 'JVM'
"Created: / 10-05-2011 / 15:01:08 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 14-09-2011 / 21:42:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaNameAndType2 methodsFor:'printing'!
--- a/JavaNativeMethod.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaNativeMethod.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -578,7 +580,7 @@
].
CacheNativeImplementation ifTrue: [ nativeImplementation := mthd. ]
].
- Verbose ifTrue: [Logger log: 'Native method invokation: ' , sel severity: #debug facility: #JVM].
+ Verbose ifTrue: [Logger log: 'Native method invokation: ' , sel severity: Logger severityDEBUG facility: #JVM].
^ mthd
valueWithReceiver: JavaVM natives
arguments: receiverAndArgsAndContext
@@ -590,7 +592,7 @@
JavaNativeMethod flushAllCachedNativeMethods"
"Created: / 27-10-2012 / 15:13:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 21-01-2013 / 17:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:06:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaNativeMethod class methodsFor:'documentation'!
--- a/JavaNativeMethodImpl_OpenJDK6.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaNativeMethodImpl_OpenJDK6.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko
SWING Research Group, Czech Technical University in Prague
@@ -11,6 +13,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#JavaNativeMethodImpl_OpenJDK6
instanceVariableNames:''
classVariableNames:''
@@ -420,11 +424,11 @@
FileIOTrace ifTrue:[
stream isFileStream ifTrue:[
- Logger log: ('write ' , count printString , ' bytes to ' , stream pathName) severity: #info facility: 'JVM'.
+ Logger log: ('write ' , count printString , ' bytes to ' , stream pathName) severity: Logger severityTRACE facility: 'JVM'.
] ifFalse:[
stream ~~ Stdout ifTrue:[
stream ~~ Stderr ifTrue:[
- Logger log: ('write ' , count printString , ' bytes to ' , stream displayString) severity: #info facility: 'JVM'.
+ Logger log: ('write ' , count printString , ' bytes to ' , stream displayString) severity: Logger severityTRACE facility: 'JVM'.
]
]
]
@@ -450,6 +454,7 @@
].
"Created: / 08-02-2013 / 11:53:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:03:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
checkWritePermissionOfDirectory:dir message:msg
@@ -611,7 +616,7 @@
[ stream := aBlock value ] on:OpenError do:[:ex|
(ex errorCode) == (OperatingSystem errorNumberFor:#EMFILE) ifTrue:[
"Worst case, try to cleanup"
- Logger log: 'maximum number of open files reached, forcing finalization...' severity: #warn facility: #JVM.
+ Logger log: 'maximum number of open files reached, forcing finalization...' severity: Logger severityWARN facility: #JVM.
[
FinalizationLobby finalizeNow.
Delay waitForSeconds: 5. "/Give Java finalization thread a chance to clean up
@@ -619,7 +624,7 @@
retry := true.
JavaVM performance printOpenExternalStreamsOn: Stderr.
] on: Error do:[:ex|
- Logger log: 'failed to force finalization: ', ex description severity: #error facility: #JVM
+ Logger log: 'failed to force finalization: ', ex description severity: Logger severityERROR facility: #JVM
].
] ifFalse:[
ex pass.
@@ -633,7 +638,7 @@
"Created: / 23-07-2012 / 19:33:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 14-08-2012 / 02:25:06 / jv"
- "Modified: / 16-01-2013 / 20:56:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:02:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
fileStreamForReading:name
@@ -7208,10 +7213,11 @@
<javanative: 'com/sun/management/UnixOperatingSystem' name: 'initialize()V'>
-Logger log: 'mh did not set page_size here, which he should :)' severity:#info facility:#JVM.
-^self.
+ Logger log: 'mh did not set page_size here, which he should :)' severity:Logger severityWARN facility:#JVM.
+ ^self.
"Modified: / 03-11-2011 / 18:59:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - com.sun.media.sound'!
@@ -11610,13 +11616,13 @@
log: ('%1 going to sleep for %2'
bindWith: Processor activeProcess printString
with: millis)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
JavaVM sleepForTimeout: millis state: #sleep.
"Modified: / 08-01-1999 / 16:42:52 / cg"
"Modified: / 30-11-2011 / 13:58:36 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 08-11-2013 / 22:55:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:05:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
_java_lang_Thread_start0: this
@@ -11835,10 +11841,10 @@
o := a1.
- Logger log: 'Finalizing ' , o printString severity: #debug facility: 'JVM' .
+ Logger log: 'Finalizing ' , o printString severity: Logger severityDEBUG facility: 'JVM' .
o perform:#'finalize()V'
- "Modified: / 24-07-2012 / 11:11:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:03:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaNativeMethodImpl_OpenJDK6 class methodsFor:'native - java.lang.reflect'!
--- a/JavaProcess.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaProcess.st Mon Mar 02 14:21:07 2015 +0000
@@ -20,6 +20,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Process subclass:#JavaProcess
instanceVariableNames:'suspendedContext'
classVariableNames:''
@@ -158,7 +160,7 @@
(procName startsWith:'JAVA-AWT-EventQueue') ifTrue:[
Logger
log:('thread ' , procName , ' aborted - restarting process.')
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
ex restart.
] ifFalse:[
@@ -167,14 +169,14 @@
ifTrue:[
Logger
log:('thread ' , procName , ' aborted - restarting process.')
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
ex restart
]
ifFalse:[
Logger
log:('thread ' , procName , ' aborted.')
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
]
].
@@ -188,13 +190,13 @@
exClass == (Java at:'java.lang.ThreadDeath') ifTrue:[
Logger
log:('thread ' , procName , ' terminated')
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
] ifFalse:[
Logger
log:('JAVA: thread ''' , procName , ''' terminated with exception: '
, exClass name)
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
].
ex return.
@@ -228,7 +230,7 @@
(Smalltalk at:#'JavaVM:ThreadTrace') == true ifTrue:[
Logger
log:('thread ' , javaProcess name , ' terminated')
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
].
] ensure:[
@@ -236,7 +238,7 @@
(Smalltalk at:#'JavaVM:ThreadTrace') == true ifTrue:[
Logger
log:('after exit of thread ' , javaProcess name)
- severity:#info
+ severity:Logger severityDEBUG
facility:'JVM'.
]
]
@@ -261,7 +263,7 @@
"Created: / 15-12-2010 / 11:06:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 09-12-2011 / 12:51:55 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 08-08-2014 / 09:03:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:02:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaProcess class methodsFor:'documentation'!
--- a/JavaVM.st Wed Feb 25 19:45:09 2015 +0100
+++ b/JavaVM.st Mon Mar 02 14:21:07 2015 +0000
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 1996-2015 by Claus Gittinger
@@ -20,6 +22,8 @@
"
"{ Package: 'stx:libjava' }"
+"{ NameSpace: Smalltalk }"
+
Object subclass:#JavaVM
instanceVariableNames:''
classVariableNames:'UnhandledJavaExceptionSignal JavaExceptionSignal
@@ -1591,12 +1595,12 @@
LockTableAccess name: 'JavaVM lock table access mutex'.
Logger
log: 'Initializing EnteredMonitorsPerProcess'
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
EnteredMonitorsPerProcess := IdentityDictionary new.
Logger
log: 'Initializing AcquiredMonitorsPerProcess'
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
AcquiredMonitorsPerProcess := IdentityDictionary new.
@@ -1604,6 +1608,7 @@
JavaVM initializeMonitorTable"
"Created: / 17-08-2012 / 11:30:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:59:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
initializeNatives
@@ -2223,12 +2228,12 @@
self releaseLeftOverMonitors.
Logger
log: 'Clearing EnteredMonitorsPerProcess'
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
EnteredMonitorsPerProcess := IdentityDictionary new.
Logger
log: 'Clearing AcquiredMonitorsPerProcess'
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
EnteredMonitorsPerProcess := IdentityDictionary new.
@@ -2238,7 +2243,7 @@
"Created: / 02-01-1998 / 18:04:05 / cg"
"Modified: / 07-01-1998 / 22:58:10 / cg"
"Modified: / 17-11-2011 / 17:00:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 13-04-2012 / 00:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
releaseAllStreams
@@ -2298,7 +2303,7 @@
:mon |
Logger
log: 'release leftover monitor ...'
- severity: #info
+ severity: Logger severityDEBUG
facility: 'JVM'.
mon release
].
@@ -2312,8 +2317,8 @@
JavaVM releaseLeftOverMonitors"
"Created: / 08-01-1998 / 17:29:26 / cg"
- "Modified: / 14-09-2011 / 22:06:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 29-11-2011 / 14:26:25 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:57:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
releasehSmalltalkClassLoader
@@ -2675,14 +2680,14 @@
result isNil ifTrue: [
Logger
log: 'Class ' , className , ' couldnt be loaded'
- severity: #warn
+ severity: Logger severityDEBUG
facility: 'JVM'
] ifFalse: [ result := self makeArrayOf: result asDescribedBy: className. ].
^ result.
"Created: / 21-10-2011 / 12:01:16 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
"Modified: / 02-11-2011 / 16:49:45 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 10-12-2013 / 22:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:01:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
classForName: className definedBy: classLoader ifAbsentPut: aBlock
@@ -3555,7 +3560,7 @@
Logger
log: 'JAVA: exception: ' , aJavaException class binaryName , ' ('
, tmpMessage , ')'
- severity: #trace
+ severity: Logger severityDEBUG
facility: 'JVM'
].
ExceptionDebug ifTrue: [
@@ -3665,7 +3670,7 @@
"Created: / 07-01-1998 / 15:28:22 / cg"
"Modified: / 24-12-1999 / 02:33:25 / cg"
"Modified: / 01-12-2011 / 18:32:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 12-06-2014 / 11:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:56:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
throwExceptionClassName: aJavaExceptionClassName withMessage: someMessage
@@ -3983,7 +3988,7 @@
[ stream := aBlock value ] on:OpenError do:[:ex|
(ex errorCode) == (OperatingSystem errorNumberFor:#EMFILE) ifTrue:[
"Worst case, try to cleanup"
- Logger log: 'maximum number of open files reached, forcing finalization...' severity: #warn facility: #JVM.
+ Logger log: 'maximum number of open files reached, forcing finalization...' severity: Logger severityWARN facility: #JVM.
[
FinalizationLobby finalizeNow.
Delay waitForSeconds: 5. "/Give Java finalization thread a chance to clean up
@@ -4005,7 +4010,7 @@
"Created: / 23-07-2012 / 19:33:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 14-08-2012 / 02:25:06 / jv"
- "Modified: / 16-01-2013 / 20:56:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:00:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaVM class methodsFor:'helpers - reflection'!
@@ -4156,7 +4161,7 @@
bindWith:(self monitorFriendlyPrintStringOf:someObject)
with: aJavaContext selector
with: thisProcess id)
- severity:#debug
+ severity:Logger severityTRACE
facility:#JVM.
].
wasBlocked := OperatingSystem blockInterrupts.
@@ -4181,7 +4186,7 @@
].
"Created: / 08-11-2011 / 15:15:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 06-12-2013 / 22:07:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:59:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
monitorExit: someObject in: aJavaContext
@@ -4199,7 +4204,7 @@
bindWith: (self monitorFriendlyPrintStringOf: someObject)
with: aJavaContext selector
with: thisProcess id)
- severity: #info
+ severity: Logger severityTRACE
facility: #JVM.
].
@@ -4219,7 +4224,7 @@
].
"Created: / 08-11-2011 / 15:17:03 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-08-2012 / 11:49:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:58:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
notify: obj
@@ -4269,7 +4274,7 @@
MonitorTrace ifTrue:[
Logger
log: ('UNWIND HANDLER: force-leaving ',aJavaContext acquiredMonitors size printString,'monitors acquired by: ' , aJavaContext printString )
- severity: #info
+ severity: Logger severityDEBUG
facility: #JVM.
].
thisProcess := Processor activeProcess.
@@ -4297,6 +4302,7 @@
].
"Created: / 05-04-2012 / 11:35:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:57:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
sleepForTimeout: tmo state: state
@@ -4368,7 +4374,7 @@
log: ('acquiring monitor %1 owned by thread: %2'
bindWith: (self monitorFriendlyPrintStringOf: obj)
with: aProcess name)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
mon acquire.
@@ -4378,7 +4384,7 @@
"/ self assert: ((self acquiredMonitorsOfProcessAt: aProcess) includes: obj).
"Created: / 17-11-2011 / 19:01:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-08-2012 / 23:24:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:56:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
acquireMonitorAndNotifyAll: handle
@@ -4503,7 +4509,7 @@
bindWith: (self monitorFriendlyPrintStringOf: obj)
with: aProcess id
with: '???' "MonitorTraceId")
- severity: #trace
+ severity: Logger severityTRACE
facility: #JVM
originator: self
"/attachment: thisContext fullPrintAllString
@@ -4515,7 +4521,7 @@
"/ self assert: ((self acquiredMonitorsOfProcessAt: aProcess) includes: objInLists).
"Created: / 17-11-2011 / 19:03:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-08-2012 / 23:21:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:00:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
enteredMonitorsOf: aProcess add: anyObject
@@ -4627,7 +4633,7 @@
bindWith: (self monitorFriendlyPrintStringOf: obj)
with: aProcess name
with: '???' "(self enteredMonitorsOfProcess: aProcess) last second")
- severity: #trace
+ severity: Logger severityTRACE
facility: #JVM
originator: self
"/attachment: thisContext fullPrintAllString
@@ -4638,7 +4644,7 @@
"/ self enteredMonitorsOf: aProcess remove: obj.
"Created: / 17-11-2011 / 18:46:33 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-08-2012 / 23:22:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:59:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
leaveMonitorsOfProcess: aProcess
@@ -4658,7 +4664,7 @@
(mon isOwnedBy: aProcess) ifTrue: [
Logger
log: ('leaving monitor owned by dying thread: ' , aProcess name)
- severity: #info
+ severity: Logger severityDEBUG
facility: #JVM.
self breakPoint: #jv.
mon exit
@@ -4669,7 +4675,7 @@
].
"Created: / 17-11-2011 / 16:51:28 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified (format): / 27-08-2012 / 11:37:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:59:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
monitorExit: someObject in: aJavaContext ifOwnedBy: aProcess
@@ -4683,13 +4689,13 @@
log: ('%1 trying to exit monitor for %2, but it does not own it. Ignoring'
bindWith: aProcess name
with: (self monitorFriendlyPrintStringOf: someObject))
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM
]
].
"Created: / 17-11-2011 / 21:17:57 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 26-08-2012 / 20:00:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
monitorFriendlyPrintStringOf: someObject
@@ -4716,7 +4722,7 @@
log: ('releasing monitor %1 owned by thread: %2'
bindWith: (self monitorFriendlyPrintStringOf: obj)
with: aProcess name)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
mon release.
@@ -4724,7 +4730,7 @@
"/ self assert: ((self enteredMonitorsOfProcessAt: aProcess) includes: obj).
"Created: / 17-11-2011 / 18:51:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-08-2012 / 23:24:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:57:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
releaseMonitorsOfProcess
@@ -4784,7 +4790,7 @@
log: thisProcess name , ' going into WAIT - releasing '
, (self countAcquiredMonitorsOfProcess: thisProcess) printString
, ' monitors'
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
self releaseMonitorsOfProcess: thisProcess.
@@ -4816,6 +4822,7 @@
"Created: / 30-12-1998 / 19:19:35 / cg"
"Modified: / 08-01-1999 / 17:29:24 / cg"
"Modified: / 20-11-2011 / 12:36:47 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
+ "Modified: / 02-03-2015 / 14:11:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaVM class methodsFor:'native - java.lang'!
@@ -4892,12 +4899,12 @@
sema := ParkUnparkSemaphores at: process ifAbsentPut:[Semaphore new].
blocked ifFalse:[ OperatingSystem unblockInterrupts ].
- Logger log: 'parking thread ', process printString severity: #debug facility: #JVM.
+ Logger log: 'parking thread ', process printString severity: Logger severityDEBUG facility: #JVM.
sema parkWithTimeoutMs: tout.
- Logger log: 'parked thread ', process printString , ' resumed' severity: #debug facility: #JVM.
+ Logger log: 'parked thread ', process printString , ' resumed' severity: Logger severityDEBUG facility: #JVM.
"Created: / 16-08-2012 / 21:51:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 18-11-2013 / 14:43:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:58:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
setInterrupted: process
@@ -4950,7 +4957,7 @@
Logger
log: ('%1 is going to die, notifying all waiters and disabling waiting on its monitor'
bindWith: jThread printString)
- severity: #debug
+ severity: Logger severityDEBUG
facility: #JVM.
].
jThread instVarNamed: 'threadStatus' put: 0.
@@ -4970,7 +4977,7 @@
"Modified: / 24-12-1999 / 03:14:33 / cg"
"Created: / 14-12-2010 / 21:31:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 09-12-2011 / 12:58:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 11-10-2013 / 11:25:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:57:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
unpark: process
@@ -4983,11 +4990,11 @@
sema := ParkUnparkSemaphores at: process ifAbsentPut:[Semaphore new].
blocked ifFalse:[ OperatingSystem unblockInterrupts ].
- Logger log: 'unparking thread ', process printString severity: #debug facility: #JVM.
+ Logger log: 'unparking thread ', process printString severity: Logger severityDEBUG facility: #JVM.
sema signal.
"Created: / 16-08-2012 / 21:52:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 18-11-2013 / 14:43:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 02-03-2015 / 13:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaVM class methodsFor:'vm support'!