Re: RFR: 8284673: Collapse identical catch branches in java.management

2022-04-11 Thread Bernd Eckenfels
Hello, > new RuntimeException(exc1.getMessage()) I typically try to avoid swallowing the cause and especially the exception type of a inner exception, especially in this case where two different exceptions are caught. Better do tostring() and/or specify the exception as a cause to have chainin

Re: RFR: 8275775: Add jcmd VM.classes to print details of all classes [v10]

2022-03-06 Thread Bernd Eckenfels
Hello, I would add an additional argument to allow substring filtering on the fully qualified class name (like com/example or UtilClass), since this can creator reduce processing/printing time. But I guess that can be added as an additional feature later on (maybe only the “verbose” variant can

Re: RFR: 8272317: jstatd has dependency on Security Manager which needs to be removed

2021-12-22 Thread Bernd Eckenfels
Hello, Is it safe to allow generic proxy objects, could they not execute arbritrary backend methods? Are the invocation handlers filtered indirectly? What about those inner classes, are they stable? Could the whole protocol maybe changed to a different protocol? Gruss Bernd -- http://bernd

Re: RFR: 8273684: Unnecessary Stack usage

2021-09-13 Thread Bernd Eckenfels
Maybe better use addFirst(), for example in CommandProcessor there is a comment that order matters (did not check it more closely), so it’s probably best to not reverse orders in any place? The Dequeue Javadoc lists addFirst as the aproperiate stack#push replacement. Gruss Bernd -- http://bernd

Re: A Bug about the JVM Attach mechanism

2019-06-19 Thread Bernd Eckenfels
The simple solution is probably not delete those files. :) If this is a long known bug, did you actually open a bug report with any of the OpenJDK contributor organizations and what’s the number? Gruss Bernd -- http://bernd.eckenfels.net Von: serviceability-de

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Bernd Eckenfels
: Freitag, Februar 15, 2019 2:19 PM An: gary.ad...@oracle.com Cc: Bernd Eckenfels; OpenJDK Serviceability Betreff: Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line On a linux system with 1 Java process and 500 non-Java processes, /tmp is not tmpfs mounted, 20 runs

Re: RFR: JDK-8149461: jmap kills process if non-java pid is specified in the command line

2019-02-15 Thread Bernd Eckenfels
Hello, I see possible issues here, not sure if they still exist but I wanted to mention them: the list-vm function might be slow on a loaded system (as it is a complex function). It’s not the best Situation if your diagnostic attempts are slow down in such a situation. Also in the past not al

Re: RFR 8215398: -Xlog option usage => Invalid decorator'\temp\app_cds.log'.

2018-12-21 Thread Bernd Eckenfels
Hello, David: > I don't have an issue with your fix. I just don't understand how the > existing test actually works when the test cases seems to fail at the > command-line for me. I think the difference between commandlie and testcase is, that the command line Interpreter might do some additio

Re: Proposal: Always-on Statistical History

2018-11-14 Thread Bernd Eckenfels
Looks good Thomas, what would be the typical memory usage with the Default Settings? Does the downsampling support min/max style rollups? -- http://bernd.eckenfels.net Von: Thomas Stüfe Gesendet: Mittwoch, 14. November 2018 16:29 An: serviceability-dev@openjdk.java.net serviceability-dev@openjd

Re: Is it possible to resurrect sa-jdi?

2018-09-05 Thread Bernd Eckenfels
I thought by providing jhsdb launcher the usage of dump based analysis became more prominent, so those attach mechanisms are not going away, right? -- https://Bernd.eckenfels.net Von: -800456320m Auftrag von Gesendet: Mittwoch, September 5, 2018 1:17 PM An: Egor

Re: Connection refused when attaching to java 9 process

2018-08-29 Thread Bernd Eckenfels
If the dynamic attach returns names (especially „localhost“ or even „hostname“) instead of the ip address in sun.jdwp.listenerAddress then this can be explained by it resolving to the wrong ip. For that reason the attach Agent should return an IP or at least a configurable hostname (like rmi.s

Re: custom/fast heap dumper

2018-08-22 Thread Bernd Eckenfels
Hello, I could imagine a fork-and-coredump Approach would be possible. This Limits the application pause to cloning the pagetables (not sure if there is a mode to avoid this). This does however put stress on the virtual Memory (and requires additional ram for the cloned structures). After the

Re: RFR: JDK-8199729 - Usage Logger open sourcing

2018-05-30 Thread Bernd Eckenfels
Would it be possible to remove all the duplicate configuration code from the PostVMInitHook and just call run() { UsageLoggerClient.logJavaUsage(); }? This way all config code can be in one place. I also wonder if the ORCL_ p

Re: RFR(s): 8203682: Add jcmd "VM.classloaders" command to print out class loader hierarchy, details

2018-05-28 Thread Bernd Eckenfels
Anything which can be done with the DelegatingClassLoaders (either add Info on their target or collabs them to a „30 x unnamed DelegatingClassloader“. Even in Verbose mode they only reveal their type (constructor, method) but not much more. Gruss Bernd -- http://bernd.eckenfels.net ___

AW: RFR (S): 8202650: Enforce group for attach listener file

2018-05-04 Thread Bernd Eckenfels
Hello, from the description below it sounds it would also be possible to remove the Group check. Would this not be an Option which more flexible allows sgid to be used as intended? (Not that I can imagine anybody Setting a sgid on /tmp?!) What is the Purpose of validating the Group ownership?

Re: Thread Native ID Access

2018-02-22 Thread Bernd Eckenfels
11:07 AM, Bernd Eckenfels wrote: Hello,   one Option would be to use nid as tid on platforms where the datatype is compatible. Thread#getId() is „positive Long“. That should work(?) at least on Windows and Linux, it will actually reduce some Overhead and make the identifier more useful for

Re: Thread Native ID Access

2018-02-22 Thread Bernd Eckenfels
Hello, one Option would be to use nid as tid on platforms where the datatype is compatible. Thread#getId() is „positive Long“. That should work(?) at least on Windows and Linux, it will actually reduce some Overhead and make the identifier more useful for Debugging without adding a new API. Wit

Re: RFR : JDK-8044122 MBean access to the PID

2017-10-26 Thread Bernd Eckenfels
separately, if needed. Otherwise, the frames in the stack when this method is called must have the security permission granted. Mandy On 10/23/17 1:00 PM, Bernd Eckenfels wrote: Hello, When running this privileged it means one can bypass the permission by using the MBean, is that intentional? (Besides

Re: RFR : JDK-8044122 MBean access to the PID

2017-10-23 Thread Bernd Eckenfels
Hello, When running this privileged it means one can bypass the permission by using the MBean, is that intentional? (Besides it is already available as the JMVID) Gruss Bernd -- http://bernd.eckenfels.net From: serviceability-dev on behalf of mandy chung Sent:

Re: RFR(10)(M): 8179498: attach in linux should be relative to /proc/pid/root and namespace aware

2017-09-13 Thread Bernd Eckenfels
of a random cwd of another process. Gruss Bernd -- http://bernd.eckenfels.net From: David Holmes Sent: Thursday, September 14, 2017 7:36:41 AM To: Chris Plummer; serguei.spit...@oracle.com; serviceability-dev; tj.fonta...@oracle.com; Bernd Eckenfels Subject: Re

Re: [PATCH] attach in linux should be relative to /proc/pid/root and namespace aware

2017-08-09 Thread Bernd Eckenfels
Hello, Just wanted to come back to this: I noticed that with systemd on Linux there is a recommended option for longrunning daemons cause PrivateTmp*. This will make the systemd manager generate a new mount namespace for this new service process and bind-mount /tmp to an isolated subdirectory i

Re: RFR: JDK-6396411 java.lang.management.MemoryMXBean.gc should force GC even if DisableExplicitGC is set

2017-07-18 Thread Bernd Eckenfels
This is cool, I have two minor comments: can it use a different/new GC Cause and the test does actually not assert failed executions. Gruss Bernd -- http://bernd.eckenfels.net From: serviceability-dev on behalf of Ujwal Vangapally Sent: Wednesday, July 19, 2017

Re: [10] RFR 8181647: jhsdb jstack could not output thread name

2017-06-14 Thread Bernd Eckenfels
I don't understand why this format is totally different from the normal stack traces? At least the header with the stack names could be similar? Gruss Bernd -- http://bernd.eckenfels.net From: serviceability-dev on behalf of chihiro ito Sent: Wednesday, June 14

Re: output of jstack command

2017-05-29 Thread Bernd Eckenfels
And just because nobody mentioned it, don't forget `jcmd Thread.print -l`. I had the impression jcmd is preferred,over the older jps/jstack/jmap gang? Gruss Bernd -- http://bernd.eckenfels.net From: serviceability-dev on behalf of Robbin Ehn Sent: Monday, May 2

Re: RFE Review : JDK-5016517 - Replace plaintext passwords by hashed passwords for out-of-the-box JMX Agent

2017-04-23 Thread Bernd Eckenfels
Hm, why introduce a new password hash format. Just use modular crypt() format (and iterations). This allows to use common tools (like htpasswd) to generate the hashes. It would use $5$ prefix for SHA256 but actually I would use $6$ for iterated SHA512 as it is the default on most recent Linux di

Re: (svc) JDK 10 RFR: 8173421: Obsolete and expired flags for JDK 10 need to be removed and related tests updated

2017-01-28 Thread Bernd Eckenfels
The comment in LowMemoryTest2 could be fixed as well, I would remove the "8mb" Gruss Bernd -- http://bernd.eckenfels.net On Sat, Jan 28, 2017 at 10:32 PM +0100, "Mandy Chung" wrote: > On Jan 27, 2017, at 1:39 AM, David Holmes wrote: > > A small serviceability part of this chang

Re: RFR: JDK-7107013: sun.jvm.hotspot.runtime.Bytes.swapLong conversion to long mishandled

2016-11-14 Thread Bernd Eckenfels
16 at 9:29 AM +0100, "Sharath Ballal" wrote: Bernd, Are you ok with the explanation and existing changes ?   -Sharath Ballal     From: Sharath Ballal Sent: Friday, November 11, 2016 12:17 PM To: Bernd Eckenfels; serviceability-dev@openjdk.java.net Subject: RE: R

Re: RFR: JDK-7107013: sun.jvm.hotspot.runtime.Bytes.swapLong conversion to long mishandled

2016-11-10 Thread Bernd Eckenfels
vely.   So for int if the little endian byte order was 3 2 1 0 it is now converted to 0 1 2 3 and similarly for long.   -Sharath Ballal     From: Bernd Eckenfels [mailto:e...@zusammenkunft.net] Sent: Thursday, November 10, 2016 1:20 PM To: serviceability-dev@openjdk.java.net; Dmit

Re: RFR: JDK-7107013: sun.jvm.hotspot.runtime.Bytes.swapLong conversion to long mishandled

2016-11-09 Thread Bernd Eckenfels
Hello, Is the a reason why swapShort has a " lowbyte | highbyyte" and the other two methods the other way around? I would all write in the natural order of. Igendianess (I.e. Change the first). Gruss Bernd -- http://bernd.eckenfels.net On Thu, Nov 10, 2016 at 8:32 AM +0100, "Sharath Ballal"

Re: Low-Overhead Heap Profiling

2015-06-24 Thread Bernd Eckenfels
Am Wed, 24 Jun 2015 16:26:35 -0700 schrieb Jeremy Manson : > > As for the other concern: my concern about *just* having the > > callback mechanism is that there is quite a lot you can't do from > > user code during an allocation, because of lack of access to JNI. > > > > > > Maybe I missed somethin

Re: System.gc() causes for jcl (BufferPoolMXBean)

2015-06-20 Thread Bernd Eckenfels
Am Sat, 20 Jun 2015 17:12:34 +0100 schrieb Alan Bateman : > Tracking peak usage would be consistent with some of the other > platform MXBeans so I think this make sense. Yes, peak usage and count is also used in for example the ThreadsMBean. > Back-off + gc is implementation specific and I don't

Re: System.gc() causes for jcl (BufferPoolMXBean)

2015-06-19 Thread Bernd Eckenfels
Hello Alan, Am Fri, 19 Jun 2015 09:10:44 +0100 schrieb Alan Bateman : > On 19/06/2015 07:00, Bernd Eckenfels wrote: > >> - why is BufferPoolMXBean not tracking allocation failures, > >> allocation count, alignment flag and maximum size (maybe even > >> mod

Re: System.gc() causes for jcl (BufferPoolMXBean)

2015-06-18 Thread Bernd Eckenfels
Hello, Am Sat, 6 Jun 2015 19:07:07 +0200 schrieb Bernd Eckenfels : > - why is BufferPoolMXBean not tracking allocation failures, allocation > count, alignment flag and maximum size (maybe even modifyable). > Would it be worth to contribute something in this area or is that > su

Wrapping sun.misc.Unsafe's native methods

2015-06-06 Thread Bernd Eckenfels
Hello, I had some application problems and thought it would be a good idea to wrap Unsafe.allocateMemory(long) to get a histogram of call-sites and to trace the memory consumptions. When I register an Java agent then sun.misc.Unsafe will not be loaded through the transformer, since it is a rather