This patchset is an alternate solution to the original: "[RFC PATCH]
perf cs-etm: Handle valid-but-zero timestamps". It uses the existing
Z option to --itrace instead of modifying the behaviour of the
cs_etm__etmq_get_timestamp() function.
Using timeless mode is equivalent to ignoring 0 timestamps, as
suggested by Mike and Leo.
It applies on top of "[PATCH v3 0/2] perf cs-etm: Set time on
synthesised samples to preserve ordering"
James Clark (3):
perf cs-etm: Move synth_opts initialisation
perf cs-etm: Start reading 'Z' --itrace option
perf cs-etm: Prevent and warn on underflows during timestamp
calculation.
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 45 ++++++++++++++-----
tools/perf/util/cs-etm.c | 20 +++++----
2 files changed, 46 insertions(+), 19 deletions(-)
--
2.28.0
Hello,
Hope you are well.
We are a high-quality manufacturer of custom apparel/uniforms with over 1500 workers in our factory.
Founded in 2006, Oasis Apparel is one of the most recognized names in Textile Manufacturing.
Oasis apparel manufactures and designs apparel and merchandise for Healthcare, Fitness Industry, Sports Teams, Promotional Companies, Grocery Chains, Sporting Events, Government, Car Chains, and many more.
Everything manufactured is very high quality, 100% customizable and made-to-order, and at a very competitive price. Our factories can be audited, tested, and checked.
We can do fast turnarounds, free designs, send samples for quality check, and lots more. We guarantee the best price for you so you can sell for a much higher margin and better quality.
Look forward to hearing from you!
Regards,
--
Daniel Smith
Director of Marketing
Oasis Apparel
HQ: Beverly Hills, CA 90211, USA
W: https://www.oasisapparelusa.org/
Dear sir/madam
I work as an agent to some Investors. Do you need a business loan or
funds for a business idea or want to expand but need huge funding? We
are expanding our investment presence by granting debt loan to fund
viable and lucrative projects. If you have any project that needs
funding, kindly revert to me with your business plan and if we find
your business to be worthy of investment, you will be promptly
contacted and both parties will meet face to face and have a
round-table meeting together.
Good documentation will be carried out between you and the Investor
before putting down his funds.
Regards
williams richard
There is an intermittent issue on Trogdor devices that
results in all Coresight timestamps having a value of zero.
Because zero is currently treated as "not found" rather
than "found but zero", this breaks the decoding flow
when it would otherwise work.
This patch adds an out parameter and return code so
the difference between zero and non-existent timestamps
can be determined.
There is also a change to fix an underflow.
Although this is a workaround, the change is technically
a valid way of writing the cs_etm__etmq_get_timestamp()
function. It could have been written similarly to this
without trying to work around this issue, so it's no less
correct. But, because it's a workaround to a problem
elsewhere, I will submit this as an RFC for feedback.
This patch applies on top of the "[PATCH v2 0/2] perf
cs-etm: Set time on synthesised samples to preserve ordering"
patchset.
Co-developed-by: Denis Nikitin <denik(a)chromium.org>
Signed-off-by: Denis Nikitin <denik(a)chromium.org>
Signed-off-by: James Clark <james.clark(a)arm.com>
---
.../perf/util/cs-etm-decoder/cs-etm-decoder.c | 5 ++++-
tools/perf/util/cs-etm.c | 22 +++++++++----------
2 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
index b01d363b9301..947e44413c6e 100644
--- a/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
+++ b/tools/perf/util/cs-etm-decoder/cs-etm-decoder.c
@@ -320,7 +320,10 @@ cs_etm_decoder__do_hard_timestamp(struct cs_etm_queue *etmq,
* which instructions started by subtracting the number of instructions
* executed to the timestamp.
*/
- packet_queue->cs_timestamp = elem->timestamp - packet_queue->instr_count;
+ if (packet_queue->instr_count >= elem->timestamp)
+ packet_queue->cs_timestamp = 0;
+ else
+ packet_queue->cs_timestamp = elem->timestamp - packet_queue->instr_count;
packet_queue->next_cs_timestamp = elem->timestamp;
packet_queue->instr_count = 0;
diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c
index e5c1a1b22a2a..1969921c406a 100644
--- a/tools/perf/util/cs-etm.c
+++ b/tools/perf/util/cs-etm.c
@@ -210,13 +210,14 @@ void cs_etm__etmq_set_traceid_queue_timestamp(struct cs_etm_queue *etmq,
etmq->pending_timestamp_chan_id = trace_chan_id;
}
-static u64 cs_etm__etmq_get_timestamp(struct cs_etm_queue *etmq,
+static int cs_etm__etmq_get_timestamp(struct cs_etm_queue *etmq,
+ u64 *timestamp,
u8 *trace_chan_id)
{
struct cs_etm_packet_queue *packet_queue;
if (!etmq->pending_timestamp_chan_id)
- return 0;
+ return -ENODATA;
if (trace_chan_id)
*trace_chan_id = etmq->pending_timestamp_chan_id;
@@ -224,13 +225,15 @@ static u64 cs_etm__etmq_get_timestamp(struct cs_etm_queue *etmq,
packet_queue = cs_etm__etmq_get_packet_queue(etmq,
etmq->pending_timestamp_chan_id);
if (!packet_queue)
- return 0;
+ return -ENODATA;
/* Acknowledge pending status */
etmq->pending_timestamp_chan_id = 0;
/* See function cs_etm_decoder__do_{hard|soft}_timestamp() */
- return packet_queue->cs_timestamp;
+ if (timestamp)
+ *timestamp = packet_queue->cs_timestamp;
+ return 0;
}
static void cs_etm__clear_packet_queue(struct cs_etm_packet_queue *queue)
@@ -864,11 +867,10 @@ static int cs_etm__setup_queue(struct cs_etm_auxtrace *etm,
* Function cs_etm_decoder__do_{hard|soft}_timestamp() does all
* the timestamp calculation for us.
*/
- cs_timestamp = cs_etm__etmq_get_timestamp(etmq, &trace_chan_id);
-
- /* We found a timestamp, no need to continue. */
- if (cs_timestamp)
+ if (!cs_etm__etmq_get_timestamp(etmq, &cs_timestamp, &trace_chan_id)) {
+ /* We found a timestamp, no need to continue. */
break;
+ }
/*
* We didn't find a timestamp so empty all the traceid packet
@@ -2286,9 +2288,7 @@ static int cs_etm__process_queues(struct cs_etm_auxtrace *etm)
if (ret)
goto out;
- cs_timestamp = cs_etm__etmq_get_timestamp(etmq, &trace_chan_id);
-
- if (!cs_timestamp) {
+ if (cs_etm__etmq_get_timestamp(etmq, &cs_timestamp, &trace_chan_id)) {
/*
* Function cs_etm__decode_data_block() returns when
* there is no more traces to decode in the current
--
2.28.0
This patchset is just a clean up and should not cause a functional change.
Junhao He (3):
coresight: core: Fix use of uninitialized pointer
coresight: core: Remove unnecessary assignment
coresight: etm4x: core: Remove redundant check of attr
drivers/hwtracing/coresight/coresight-core.c | 3 +--
drivers/hwtracing/coresight/coresight-etm4x-core.c | 5 -----
2 files changed, 1 insertion(+), 7 deletions(-)
--
2.7.4
Hello,
Hope you are well.
We are a high-quality manufacturer of custom apparel/uniforms with over 1500 workers in our factory.
Founded in 2006, Oasis Apparel is one of the most recognized names in Textile Manufacturing.
Oasis apparel manufactures and designs apparel and merchandise for Healthcare, Fitness Industry, Sports Teams, Promotional Companies, Grocery Chains, Sporting Events, Government, Car Chains, and many more.
Everything manufactured is very high quality, 100% customizable and made-to-order, and at a very competitive price. Our factories can be audited, tested, and checked.
We can do fast turnarounds, free designs, send samples for quality check, and lots more. We guarantee the best price for you so you can sell for a much higher margin and better quality.
Look forward to hearing from you!
Regards,
--
Olivia Smith
Director of Marketing
Oasis Apparel
HQ: Beverly Hills, CA 90211, USA
W: http://usaoasisapparel.online/