Merge remote-tracking branch 'tip/perf/urgent' into perf/core
To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -96,11 +96,19 @@ int cs_etm_decoder__get_packet(struct cs_etm_decoder *decoder,
|
||||
/* Nothing to do, might as well just return */
|
||||
if (decoder->packet_count == 0)
|
||||
return 0;
|
||||
/*
|
||||
* The queueing process in function cs_etm_decoder__buffer_packet()
|
||||
* increments the tail *before* using it. This is somewhat counter
|
||||
* intuitive but it has the advantage of centralizing tail management
|
||||
* at a single location. Because of that we need to follow the same
|
||||
* heuristic with the head, i.e we increment it before using its
|
||||
* value. Otherwise the first element of the packet queue is not
|
||||
* used.
|
||||
*/
|
||||
decoder->head = (decoder->head + 1) & (MAX_BUFFER - 1);
|
||||
|
||||
*packet = decoder->packet_buffer[decoder->head];
|
||||
|
||||
decoder->head = (decoder->head + 1) & (MAX_BUFFER - 1);
|
||||
|
||||
decoder->packet_count--;
|
||||
|
||||
return 1;
|
||||
|
@@ -208,4 +208,22 @@ static inline int insn_offset_immediate(struct insn *insn)
|
||||
return insn_offset_displacement(insn) + insn->displacement.nbytes;
|
||||
}
|
||||
|
||||
#define POP_SS_OPCODE 0x1f
|
||||
#define MOV_SREG_OPCODE 0x8e
|
||||
|
||||
/*
|
||||
* Intel SDM Vol.3A 6.8.3 states;
|
||||
* "Any single-step trap that would be delivered following the MOV to SS
|
||||
* instruction or POP to SS instruction (because EFLAGS.TF is 1) is
|
||||
* suppressed."
|
||||
* This function returns true if @insn is MOV SS or POP SS. On these
|
||||
* instructions, single stepping is suppressed.
|
||||
*/
|
||||
static inline int insn_masking_exception(struct insn *insn)
|
||||
{
|
||||
return insn->opcode.bytes[0] == POP_SS_OPCODE ||
|
||||
(insn->opcode.bytes[0] == MOV_SREG_OPCODE &&
|
||||
X86_MODRM_REG(insn->modrm.bytes[0]) == 2);
|
||||
}
|
||||
|
||||
#endif /* _ASM_X86_INSN_H */
|
||||
|
@@ -531,6 +531,8 @@ static PyObject *get_perf_sample_dict(struct perf_sample *sample,
|
||||
PyLong_FromUnsignedLongLong(sample->period));
|
||||
pydict_set_item_string_decref(dict_sample, "phys_addr",
|
||||
PyLong_FromUnsignedLongLong(sample->phys_addr));
|
||||
pydict_set_item_string_decref(dict_sample, "addr",
|
||||
PyLong_FromUnsignedLongLong(sample->addr));
|
||||
set_sample_read_in_dict(dict_sample, sample, evsel);
|
||||
pydict_set_item_string_decref(dict, "sample", dict_sample);
|
||||
|
||||
|
Reference in New Issue
Block a user