Re: __predict_false for pledge

2015-10-29 Thread Michael McConville
Ted Unangst wrote: > Michael McConville wrote: > > Ted Unangst wrote: > > > Michael McConville wrote: > > > > We have a pretty strong guarantee that it can only happen once > > > > per process... > > > > > > I don't think this really matters. What does it do to the > > > assmembly, and how does th

Re: __predict_false for pledge

2015-10-26 Thread Michael McConville
Theo de Raadt wrote: > > Not sure how people feel about these annotations. This is a pretty > > classic use case, though. > > No, the classic case is when the condition is a single variable, > rather than a condition "always true && rarely true". It wraps the whole condition, right? There are man

Re: __predict_false for pledge

2015-10-26 Thread Michael McConville
Philip Guenther wrote: > On Mon, Oct 26, 2015 at 8:46 AM, Michael McConville wrote: > > We have a pretty strong guarantee that it can only happen once per > > process... > ... > > --- sys/sys/syscall_mi.h9 Oct 2015 01:17:18 - 1.11 > > +++ sys/sys/syscall_mi.h26 Oct 2015 1

Re: __predict_false for pledge

2015-10-26 Thread Theo de Raadt
> Not sure how people feel about these annotations. This is a pretty > classic use case, though. No, the classic case is when the condition is a single variable, rather than a condition "always true && rarely true".

Re: __predict_false for pledge

2015-10-26 Thread Ted Unangst
Michael McConville wrote: > Ted Unangst wrote: > > Michael McConville wrote: > > > We have a pretty strong guarantee that it can only happen once per > > > process... > > > > I don't think this really matters. What does it do to the assmembly, > > and how does that make things faster? > > It lets

Re: __predict_false for pledge

2015-10-26 Thread Michael McConville
Ted Unangst wrote: > Michael McConville wrote: > > We have a pretty strong guarantee that it can only happen once per > > process... > > I don't think this really matters. What does it do to the assmembly, > and how does that make things faster? It lets the compiler know that the body is very unl

Re: __predict_false for pledge

2015-10-26 Thread Theo de Raadt
> On Mon, Oct 26, 2015 at 8:46 AM, Michael McConville wrote: > > We have a pretty strong guarantee that it can only happen once per > > process... > ... > > --- sys/sys/syscall_mi.h9 Oct 2015 01:17:18 - 1.11 > > +++ sys/sys/syscall_mi.h26 Oct 2015 15:13:44 - > > @@ -7

Re: __predict_false for pledge

2015-10-26 Thread Philip Guenther
On Mon, Oct 26, 2015 at 8:46 AM, Michael McConville wrote: > We have a pretty strong guarantee that it can only happen once per > process... ... > --- sys/sys/syscall_mi.h9 Oct 2015 01:17:18 - 1.11 > +++ sys/sys/syscall_mi.h26 Oct 2015 15:13:44 - > @@ -72,7 +72,8 @@ m

Re: __predict_false for pledge

2015-10-26 Thread Ted Unangst
Michael McConville wrote: > We have a pretty strong guarantee that it can only happen once per > process... I don't think this really matters. What does it do to the assmembly, and how does that make things faster?

__predict_false for pledge

2015-10-26 Thread Michael McConville
We have a pretty strong guarantee that it can only happen once per process... Index: sys/sys/syscall_mi.h === RCS file: /cvs/src/sys/sys/syscall_mi.h,v retrieving revision 1.11 diff -u -p -r1.11 syscall_mi.h --- sys/sys/syscall_mi.h