This is the mail archive of the
mailing list for the GDB project.
Re: [PATCH 05/10] Invalidate or shrink dcache when setting is changed.
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Tue, 19 Nov 2013 20:47:44 +0800
- Subject: Re: [PATCH 05/10] Invalidate or shrink dcache when setting is changed.
- Authentication-results: sourceware.org; auth=none
- References: <1383458049-20893-1-git-send-email-yao at codesourcery dot com> <1383458049-20893-6-git-send-email-yao at codesourcery dot com> <528A38B5 dot 6020906 at redhat dot com> <528AFE6E dot 9000009 at codesourcery dot com> <528B4DCA dot 8090404 at redhat dot com>
On 11/19/2013 07:38 PM, Pedro Alves wrote:
Sure, OK, I guess I did the wrong question then. I really mean,
why should we care about preserving the cache when the user
changes cache size? What makes this a use case users actually
care about? I don't think users going to be doing this
To question #1, because it is expensive to fetch contents from target
memory, and it is unnecessary to flush cache when user changes cache size.
To question #2, nothing. Cache invalidation is invisible to user.
sort of thing in a loop? At most a couple times to check which
size might be better for then, and then stick it in .gdbinit,
forever after forgotten.
Actually, if I was probing for the ideal size, I think I'd be
annoyed that GDB didn't flush the cache, as I'd try
disassembling/backtracing with different cache sizes, and
always want to start from a cold cache.
I agree that use case #3 is not very useful.
>This "extra complication" looks natural or reasonable to a software
It's always a complication/necessity/usefulness balance.
It doesn't look so reasonable if the complication it adds
isn't useful in practice, because more code usually means more
chances of getting things wrong. The question is then what is
the real use case that makes this necessary, as opposed to keeping
If use case #1 and #2 are not real use cases, I don't have a real use
case to show the cache invalidation is avoided due this patch.