We may have to add a new interface.  In some other cases, I've seen
errno being used for error reporting, but that requires changes in
applications to recognize the error.  It's probably better to crash here
than to fail mysteriously later.

Out of curiosity, how many times do you call the registration functions
from your application?  Would a batch registration interface help?  It
could address error reporting as well.

we are compiling SQL queries into machine code, which means we call __(de)register_frame once per query. There is usually no way to batch that, as the queries typically come in one after the other. In practice the system caches generated code, which means that most of the time are we executing an already compiled query with different parameters. Thus __register_frame is not a big performance problem for us, but unwinding is, as queries are executed in parallel using hundreds of threads and some of them fail.

Thank you for your detailed feedback, I will incorporate your suggestions and will send an updated patch in a few days.

Best

Thomas

Reply via email to