RE: [PATCH 3/7] btrace: Use binary search to find instruction.

Wiederhake, Tim
2016-11-02T10:01:57Z

Hi Simon,

Thanks for your input!

> Unless you expect to backport this patch in the 7.12 branch (which I don't think is the case here), you can use C++ standard containers and functions. Specifically, std::vector instead of DEF_VEC, and probably std::lower_bound (if I understand correctly what the code is doing).

struct btrace_thread_info is initialized by memset'ing it to zero. If I'm not mistaken we can't do that if the struct contains a C++ member with a constructor.

> Also, since we now have btrace_function pointers in a sorted vector, do we still need them to be linked together as a linked list?

The btrace_function pointers will go away in the next patch series.

Tim
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928