cyb70289 commented on a change in pull request #10859:
URL: https://github.com/apache/arrow/pull/10859#discussion_r681592003
##########
File path: cpp/src/arrow/csv/chunker.cc
##########
@@ -63,12 +63,18 @@ class Lexer {
case IN_FIELD:
goto InField;
case AT_ESCAPE:
+ // will never reach here if escaping = false
+ // just to hint the compiler to remove dead code
+ if (!escaping) return nullptr;
goto AtEscape;
case IN_QUOTED_FIELD:
+ if (!quoting) return nullptr;
goto InQuotedField;
Review comment:
The way I validate above assumption is a bit rough.
I added below code snippet after
[InQuotedField](https://github.com/apache/arrow/blob/de7cc1e4820e96531aae3b7f3fc9105f7b3a5f3a/cpp/src/arrow/csv/chunker.cc#L124)
```
InQuotedField:
if (!quoting) {
__asm volatile ("pause" ::: "memory");
__asm volatile ("pause" ::: "memory");
__asm volatile ("pause" ::: "memory");
}
```
Logically, these three "pause" instruction should not be available.
Without this patch, I can find the three continuous pause in disassembled
libarrow.so. With this patch, they are gone.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]