Community
Participate
Working Groups
Build Identifier: 20100527-0614 In Acquire head dump dialog, if the file (in which we want to save the dump) already exists, a warning pop up on the finish. it would be more user-friendlty if a decoration on the text box warn the user. This can be useful when we are taking several dump of the memory of the same process(a common usage?) Another thoughts : we can try to generate a name suffixed with number to avoid to the user to change the name. In the same time, we can perhaps improve the message and replace folder by file. Reproducible: Always Steps to Reproduce: 1.acquire a dump 2. acquire another dump of the same process 3.
> In the same time, we can perhaps improve the message and replace folder by > file. Ok. Just replace by file isn't a good idea. As we choose a folder with the browse. But the fact that it writes the file name when selecting a process makes the text a little weird... But I don't have better solution to propose so just keep in mind that it can implies some "troubles" in mind of some user (only mine perhaps :s)
I'm experimenting with this. Perhaps its better to use a DirectoryDialog before a process is chosen and a FileDialog (with overwrite warning) afterwards.
Other problems I've seen are: Next and Finish buttons remain active after 'Refresh' or 'Configure' clears the process list. Clearing the list should clear the dump provider arguments. With an IBM dump provider, changing the settings on a Heap Dump Provider arguments then going back doesn't show the new suggested dump name in the Acquire Heap Dump Dialog. This is because settings from the table are only copied into the VmInfo just before generating the dump. It would be better if the dump name changed to reflect the new dump type. If a directory rather than a file name is specified in the folder name box then at the finish stage it offers to delete the file (folder!). The next button should not allow a directory name only.
I've put the changes necessary to fix comment 2 and comment 3. I've added a warning message if the file exists: File exists and will be overwritten by the new snapshot and an error message if the file is a directory File is a directory I've disabled the finish button as well as the next button if a process is not selected or a dump file is unsuitable.
The latest code should be available as an update site from: https://build.eclipse.org/hudson/job/cbi-mat-nightly/245 Does this solve most of the problems? As for 'a name suffixed with number to avoid to the user to change the name.' This might be possible, but would needs to be done the the AcquireDialog, but ideally the dump providers would have some control. How about using a MessageFormat string? Instead of %pid% then the proposed file name could have 3 substitutions, date, pid and sequence number, incremented as required. java_pid{1,number,0).{2,number,0000}.hprof The slightly tricky part could be avoiding unwanted locale changes, so the {1,number,0} avoids commas or dots in the PID. Is this a good idea?
I've added a sequence number for acquiring dumps. Show we make the template file name for HPROF dumps configurable?
ad configurable: I wouldn't bother, rather keep it simple, these files are temporary files most of the times anyway.
I think the way of acquiring the heap dump might be a little better if the configure heap dump providers dialog was also a wizard page, so you went from 1. Configure Heap Dump Providers 2. Choose target Java process 3. Select heap dump arguments 4. Press finish to generate a dump and you might skip 1. if it was already configured in some way (and the back button would let you reconfigure the providers).
This is fixed. Making configure heap dump providers dialog a wizard page would need to be a separate item.
thanks :)