2011-12-13 Yao Qi <yao@codesourcery.com>
* tracepoint.c (trace_buffer_alloc): Replace magic numbers with macros. (upload_fast_traceframes, upload_fast_traceframes): Likewise.
This commit is contained in:
parent
8a40f88195
commit
2ece82445d
2 changed files with 14 additions and 7 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2011-12-13 Yao Qi <yao@codesourcery.com>
|
||||||
|
|
||||||
|
* tracepoint.c (trace_buffer_alloc): Replace magic numbers with
|
||||||
|
macros.
|
||||||
|
(upload_fast_traceframes, upload_fast_traceframes): Likewise.
|
||||||
|
|
||||||
2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
||||||
|
|
||||||
* linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
|
* linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
|
||||||
|
|
|
@ -1588,8 +1588,9 @@ trace_buffer_alloc (size_t amt)
|
||||||
|
|
||||||
#ifdef IN_PROCESS_AGENT
|
#ifdef IN_PROCESS_AGENT
|
||||||
/* Build the tentative token. */
|
/* Build the tentative token. */
|
||||||
commit_count = (((prev & 0x0007ff00) + 0x100) & 0x0007ff00);
|
commit_count = (((prev & GDBSERVER_FLUSH_COUNT_MASK_CURR) + 0x100)
|
||||||
commit = (((prev & 0x0007ff00) << 12)
|
& GDBSERVER_FLUSH_COUNT_MASK_CURR);
|
||||||
|
commit = (((prev & GDBSERVER_FLUSH_COUNT_MASK_CURR) << 12)
|
||||||
| commit_count
|
| commit_count
|
||||||
| curr);
|
| curr);
|
||||||
|
|
||||||
|
@ -1621,8 +1622,8 @@ trace_buffer_alloc (size_t amt)
|
||||||
|
|
||||||
refetch = trace_buffer_ctrl_curr;
|
refetch = trace_buffer_ctrl_curr;
|
||||||
|
|
||||||
if ((refetch == commit
|
if (refetch == commit
|
||||||
|| ((refetch & 0x7ff00000) >> 12) == commit_count))
|
|| ((refetch & GDBSERVER_FLUSH_COUNT_MASK_PREV) >> 12) == commit_count)
|
||||||
{
|
{
|
||||||
/* effective */
|
/* effective */
|
||||||
trace_debug ("change is effective: (prev=%08x, commit=%08x, "
|
trace_debug ("change is effective: (prev=%08x, commit=%08x, "
|
||||||
|
@ -7080,10 +7081,10 @@ upload_fast_traceframes (void)
|
||||||
|
|
||||||
/* Update the token, with new counters, and the GDBserver stamp
|
/* Update the token, with new counters, and the GDBserver stamp
|
||||||
bit. Alway reuse the current TBC index. */
|
bit. Alway reuse the current TBC index. */
|
||||||
prev = ipa_trace_buffer_ctrl_curr & 0x0007ff00;
|
prev = ipa_trace_buffer_ctrl_curr & GDBSERVER_FLUSH_COUNT_MASK_CURR;
|
||||||
counter = (prev + 0x100) & 0x0007ff00;
|
counter = (prev + 0x100) & GDBSERVER_FLUSH_COUNT_MASK_CURR;
|
||||||
|
|
||||||
ipa_trace_buffer_ctrl_curr = (0x80000000
|
ipa_trace_buffer_ctrl_curr = (GDBSERVER_UPDATED_FLUSH_COUNT_BIT
|
||||||
| (prev << 12)
|
| (prev << 12)
|
||||||
| counter
|
| counter
|
||||||
| curr_tbctrl_idx);
|
| curr_tbctrl_idx);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue