Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow index files to go in a separate directory #6

Open
eclipsewebmaster opened this issue May 8, 2024 · 5 comments
Open

Allow index files to go in a separate directory #6

eclipsewebmaster opened this issue May 8, 2024 · 5 comments

Comments

@eclipsewebmaster
Copy link

| --- | --- |
| Bugzilla Link | 297599 |
| Status | NEW |
| Importance | P3 enhancement |
| Reported | Dec 11, 2009 11:33 EDT |
| Modified | Nov 08, 2013 07:36 EDT |
| Version | 0.8 |
| Reporter | Andrew Johnson |

Description

I've had some requests for the index files for Memory Analyzer to go in a separate directory.

Some possibilities:

  1. A directory based on my dump file. E.g.
    /u/user1/mydump.20091001.dmp.zip
    /u/user1/mydump.20091001.dmp.indexes/mydump.20091001.dmp.index
    /u/user1/mydump.20091001.dmp.indexes/mydump.20091001.dmp.o2c.index

  2. A directory in the same directory as the dump
    /u/user1/mydump.20091001.dmp.zip
    /u/user1/.metadata/mydump.20091001.dmp.index
    /u/user1/.metadata/mydump.20091001.dmp.o2c.index

/u/user1/dmp2/mydump.20090808.dmp.zip
/u/user1/dmp2/.metadata/mydump.20090808.dmp.index
/u/user1/dmp2/.metadata/mydump.20090808.dmp.o2c.index

  1. Another specified directory
    /u/user1/mydump.20091001.dmp.zip
    /tmp/tempindexes/mydump.20091001.dmp.index
    /tmp/tempindexes/mydump.20091001.dmp.o2c.index

How would we specify this while not breaking existing behaviour but still allowing batch and GUI modes to use other directories when required?

@eclipsewebmaster
Copy link
Author

By Krum Tsvetkov on Dec 15, 2009 06:23

I think we need to keep the current behaviour as default. There are many people already who are used to it.
We could look for a way to specify an alternative behaviour. But what bothers me at the moment is the scope of this setting, namely:

  • Shall we specify for it globally for the tool?
  • Or shall one specify this per heap dump?

In both cases we will have to find where the indexes of an already parsed with a different setting heapdump are?
Having an absolute path (e.g. option 3) will make it impossible (or say it more difficult) to move the dump from one place to another.

Have you got some ideas about these already?

@eclipsewebmaster
Copy link
Author

By Andrew Johnson on Mar 05, 2013 09:06

Another idea is to use an Eclipse workspace which has a folder with a link to the dump, but the indices get stored directly in the folder in the workspace.

/u/user1/workspace/folder/mydump.20091001.dmp.zip -> /u/user1/mydump.20091001.dmp.zip
/u/user1/workspace/folder/mydump.20091001.dmp.index

@eclipsewebmaster
Copy link
Author

By Krum Tsvetkov on Mar 11, 2013 03:48

(In reply to comment #2)

Another idea is to use an Eclipse workspace which has a folder with a link
to the dump, but the indices get stored directly in the folder in the
workspace.

/u/user1/workspace/folder/mydump.20091001.dmp.zip ->

/u/user1/mydump.20091001.dmp.zip
/u/user1/workspace/folder/mydump.20091001.dmp.index

Does this work on Win too? I played with manually creating a shortcut in a folder, but the indeces always go in the original folder...
Sorry if I've misunderstood the idea.

@eclipsewebmaster
Copy link
Author

By Andrew Johnson on Mar 11, 2013 09:53

Your are right, currently the indices do get stored in the original folder, but I was offering a suggestion for a change.

We would need to generate a prefix from the IFile not the IPath.
It could be tricky to pass the prefix into the parser:
SnapshotFactory.openSnapshot(File file, Map<String, String> arguments, IProgressListener listener)
which is called from ParseHeapDumpJob or ParseSnapshotApp

@eclipsewebmaster
Copy link
Author

By Andrew Johnson on Nov 08, 2013 07:36

task 380858 allows separate indices for different snapshots in one dump.
This might allow us to find the original dump from the index if the index is held elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant