This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 00/10 V2] Cache code access for disassemble
- From: Yao Qi <yao at codesourcery dot com>
- To: <gdb-patches at sourceware dot org>
- Date: Sun, 3 Nov 2013 13:54:00 +0800
- Subject: [PATCH 00/10 V2] Cache code access for disassemble
- Authentication-results: sourceware.org; auth=none
Hi,
This is the V2 of this patch series. In the discussion of V1, the
major comments are:
1. dcache.c and target_dcache needs some cleanups and factor.
2. commands "set dcache size" and "set dcahce line-size" needs a
description on semantics when dcache is per-address_space.
3. Use a single global 'target_dcache' for both stack caching and
code caching.
4. Replace "executable code" with "code segment" in doc and NEWS.
V2 addresses these comments as follows:
Patch #1 ~ #4 are about cleanups and factors to dcache.c and
target_dcache. Patch #5 is a minor optimization to target_dcache.
Patch #6 and #7 change target_dcache to per-address_space mode, and
update doc on dcache-related commands.
We decide to use single 'target_dcache' for caching different types
of access, so cache invalidation caused by option "stack-cache"
changes makes troubles. Think a little, I find we don't have to
invalidate target_dcache when option "stack-cache" is changed. This
is what patch #8 does, and looks change in patch #8 doesn't affect
the semantics of option "set stack-cache".
Patch #9 adds command "set code-cache", similar to "set stack-cache", and
patch #10 is to use TARGET_OBJECT_CODE_MEMORY to read for disassembly.
Patch 4, 5, 7, and 9 need doc review.
Each patch is regression tested on x86_64-linux.
*** BLURB HERE ***
Yao Qi (10):
Remove last_cache
Don't update target_dcache if it is not initialized
Move target-dcache out of target.c
Don't stress 'remote' in "Data Caching" in doc
Invalidate or shrink dcache when setting is changed.
Add REGISTRY for struct address_space.
Associate target_dcache to address_space.
Don't invalidate dcache when option stack-cache is changed
set/show code-cache
Use target_read_code in disassemble.
gdb/Makefile.in | 6 +-
gdb/NEWS | 6 ++
gdb/dcache.c | 93 ++++++++++++++++++---------
gdb/dcache.h | 4 +
gdb/disasm.c | 2 +-
gdb/doc/gdb.texinfo | 52 ++++++++++-----
gdb/memattr.c | 1 +
gdb/progspace.c | 14 ++---
gdb/progspace.h | 19 +++++-
gdb/target-dcache.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++++
gdb/target-dcache.h | 30 +++++++++
gdb/target.c | 94 +++++++++-------------------
gdb/target.h | 9 ++-
gdb/top.c | 1 +
gdb/tracepoint.c | 1 +
15 files changed, 379 insertions(+), 128 deletions(-)
create mode 100644 gdb/target-dcache.c
create mode 100644 gdb/target-dcache.h
--
1.7.7.6