IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
* largefile_wrappers.h (fopen_for_input): Define along with
fopen_for_output.
* mmap_cache.c: Include "largefile_wrappers.h".
(fopen_for_input): Remove.
* defs.h (struct mmap_cache_t): Add major and minor fields.
* mmap_cache.c (build_mmap_cache): Record device major and minor numbers.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
mmap_cache was enabled indirectly via unwind feature. As now mmap_cache
can be used by other part of strace, a way to enable mmap_cache directly
is needed.
* defs.h (mmap_cache_enable, mmap_cache_is_enabled): New function
prototypes.
* mmap_cache.c (use_mmap_cache): New file local variable.
(mmap_cache_enable, mmap_cache_is_enabled): New functions.
* syscall.c (syscall_exiting_decode): Use mmap_cache_is_enabled()
instead of stack_trace_enabled.
* unwind.c (unwind_init): Invoke mmap_cache_enable.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
To make mmap_cache reusable, records protection bits of mmap entries.
* defs.h (mmap_cache_protection): New enum.
* mmap_cache.c (build_mmpa_cache): Don't ignore entries that are not
executable, just record the protection bits here.
* unwind.c (print_stack_frame): Ignore entries that are not executable.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
print_stack_frame function in unwind.c searches a mmap entry in mmap
cache. The found entry is then used for unwinding. However, a function
searching for a mmap entry may be useful for other purposes than
unwinding.
This change re-factors the function; code for searching an entry is
now defined as a stand-alone function named mmap_cache_search.
* defs.h (mmap_cache_search): New function prototype.
print_stack_frame.
* mmap_cached.c (mmap_cache_search): New function derived from
print_stack_frame.
* unwind.c (print_stack_frame): Use it.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
For making mmap cache code reusable from other areas in strace than
unwind, mmap cache related code and unwind related code should be
separated.
This change moves the most of mmap cache code from unwind.c
to mmap_cache.c, a new file.
* unwind.c: Move mmap_cache implementation ...
* mmap_cache.c: ... to this new file.
* Makefile.am (strace_SOURCES): add mmap_cache.c.
* defs.h (struct tcb): Move mmap_cache, mmap_cache_size, and
mmap_cache_generation fields out of [USE_LIBUNWIND] condition.
(mmap_cache_invalidate, mmap_cache_delete,
mmap_cache_rebuild_if_invalid): New function prototypes.
(struct mmap_cache_t, enum mmap_cache_rebuild_result): Move from
unwind.c.
* syscall.c (syscall_exiting_decode): Replace unwind_cache_invalidate
with mmap_cache_invalidate.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>