Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2010-08-11 17:27:25 +0000
committereutarass2010-08-11 17:27:25 +0000
commit0814d8af8946b392acd326c51686576faf7178d2 (patch)
tree7398759d10460d506c7368957c4d8502e7be9501
parent436161b04758468d873005d4753c9de38056b6e4 (diff)
downloadorg.eclipse.tcf.agent-0814d8af8946b392acd326c51686576faf7178d2.tar.gz
org.eclipse.tcf.agent-0814d8af8946b392acd326c51686576faf7178d2.tar.xz
org.eclipse.tcf.agent-0814d8af8946b392acd326c51686576faf7178d2.zip
TCF Agent: improved DWARF cache efficiency: added small delay when disposing the cache after all contexts exited
-rw-r--r--services/tcf_elf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/services/tcf_elf.c b/services/tcf_elf.c
index f1cebf1e..fe5c66c6 100644
--- a/services/tcf_elf.c
+++ b/services/tcf_elf.c
@@ -42,6 +42,7 @@
# define USE_MMAP
#endif
+#define MIN_FILE_AGE 3
#define MAX_FILE_AGE 60
typedef struct FileINode {
@@ -101,7 +102,7 @@ static void elf_cleanup_event(void * arg) {
elf_cleanup_posted = 0;
while (file != NULL) {
file->age++;
- if (file->age > MAX_FILE_AGE || list_is_empty(&context_root)) {
+ if (file->age > MAX_FILE_AGE || file->age > MIN_FILE_AGE && list_is_empty(&context_root)) {
ELF_File * next = file->next;
elf_dispose(file);
file = next;
@@ -627,6 +628,7 @@ static ELF_File * open_memory_region_file(MemoryRegion * r, int * error) {
if (r->dev != 0 && file->dev != r->dev) return NULL;
if (r->ino != 0 && file->ino != r->ino) return NULL;
file->debug_info_file_name = get_debug_info_file_name(file, error);
+ if (file->debug_info_file_name) trace(LOG_ELF, "Debug info file found %s", file->debug_info_file_name);
}
return file;
}

Back to the top