[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v1] xen/trace: remove duplicate check for tb_init_done
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Olaf Hering <olaf@xxxxxxxxx>
- Date: Fri, 16 Jun 2023 14:39:38 +0200
- Arc-authentication-results: i=1; strato.com; arc=none; dkim=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1686919184; s=strato-dkim-0002; d=strato.com; h=Message-Id:Date:Subject:Cc:To:From:Cc:Date:From:Subject:Sender; bh=wFK9LEIHC5Lyh2cqXtt1DBdqqnSo5xG2B7caRPIX1zY=; b=kXl49KidqUoGqMbMi4va2YF+5gFTw6ftzii6joI+ldhgyQ5JwSxoP08Bd7seJkHDMq VOKRTvsLQjuhZdGcnsJaaRJS8INNQbWbEG+87XkoLFPr9iFLRzoTf60rt5ceqWNjkpDh BBNpZZMJAiMlLxSOCxLtFykTPZczspNKBBIncDhNwYiP3hQgO1rWhkqBcxL1fC+gfBid 1R26Nf5H9H7oIVs+vm9Z4VMHdhQNKxZwrf2YlvPK4BGgd7VnvfcqL2tXZM/Bar0L1C8a /S2jS2Rjd+qg/ZbXfMeukeyueG9/LGYvKrIhy21pDvIA8o3TJJYfFXBce30vLKAGiNbi U6Dg==
- Arc-seal: i=1; a=rsa-sha256; t=1686919184; cv=none; d=strato.com; s=strato-dkim-0002; b=Sau7TxcbMD2hYKuqP3OZCZG8xZBNQnYKkaOZ/2YLGMAGASd+SgzY+2j7WSNjx7vECw /5FntSOkpYKVdwp1HHktGpUvhXXgKTDTCK8SdQk9Oj07uskTqkPihElmCCyLJhp+/Um7 0djy/yGPUeajjCpk/0Yt101FgLKqe904rFqCEO2SmZiVgU4C26A8mQaIpILkeUvRaizO D9odxB66ocoHlR1BAlSLBykoxIZZFWmOmWdmIKv8XSqjpMeTf7oMh6RauV4Kbj2vjwq5 l+/pKS7U0AysDc8MbdKkLNtgsHJHC8NTiWbxPy/hiSOmvGWxUTwcPFocVoudt0objUjO e+aA==
- Cc: George Dunlap <george.dunlap@xxxxxxxxxx>
- Delivery-date: Fri, 16 Jun 2023 12:40:02 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
The single caller of next_record already checked for
tb_init_done. The functions are called with t_lock
held. The call stack look like this:
__trace_var
tb_init_done?
insert_wrap_record
insert_lost_records
__insert_record
next_record
tb_init_done?
Signed-off-by: Olaf Hering <olaf@xxxxxxxxx>
---
xen/common/trace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/common/trace.c b/xen/common/trace.c
index 582c58c884..8d56124ec9 100644
--- a/xen/common/trace.c
+++ b/xen/common/trace.c
@@ -514,7 +514,7 @@ static unsigned char *next_record(const struct t_buf *buf,
uint32_t *next,
barrier(); /* must read buf->prod and buf->cons only once */
*next = x;
- if ( !tb_init_done || bogus(x, cons) )
+ if ( bogus(x, cons) )
return NULL;
if ( x >= data_size )
|