On Fri, 12 May 2023 04:55:30 GMT, David Holmes <[email protected]> wrote:
> Is this the only possible reason? Yes I think it is - although IOException is already declared by importRemoteFrom, and that calls perf.attach(id) which declares IOException, the native Perf_Attach doesn't look like it throws it (OOM and IllegalArgument can be thrown). BUT maybe a better alternative is to catch the BufferUnderflowException, this is the unchecked Exception which currently terminates us. This is more specific and safer in case we ever do make more use of IOException in the attach - I wil update... (Use of ConnectorAddressLink is all about communication within the same process so it doesn't expect any problems...) > Will the user understand what this message means? If I use the BufferUnderflowException, there's no detail message so it will say: Warning: Exception thrown by the agent : JDP not starting, PerfData not available If you have added -UsePerfData you should see the connection, it's not too chatty, and isn't saying too much in case it's wrong and the perfdata failed to allocate for some other reason. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13928#discussion_r1192113851
