[Bug c++/66264] New: [untaken optimization] switch enums without default-case

2015-05-23 Thread jk3064 at arcor dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66264

Bug ID: 66264
   Summary: [untaken optimization] switch  enums without
default-case
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
  Assignee: unassigned at gcc dot gnu.org
  Reporter: jk3064 at arcor dot de
  Target Milestone: ---

example:
https://goo.gl/UFYF6G

Even when the switch() contains all enums, it won't use a lookuptable when no
default-case is given.


[Bug libgomp/55411] OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed

2012-12-02 Thread jk3064 at arcor dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55411



jk3064 jk3064 at arcor dot de changed:



   What|Removed |Added



 Status|ASSIGNED|RESOLVED

 Resolution||FIXED



--- Comment #7 from jk3064 jk3064 at arcor dot de 2012-12-02 17:26:14 UTC ---

Thank you!

That fixed it.

The omp threads of the 2nd thread obv. still don't copy the policies of the

main one, but this would be even counterproductive (you would have ~twice more

threads with 100% cpu usage than you got cores). This could only be solved with

an either process or OS shared workerpool, what is another topic. So the ticket

can be closed :)


[Bug libgomp/55411] New: OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed

2012-11-20 Thread jk3064 at arcor dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55411



 Bug #: 55411

   Summary: OMP threads lose their OMP_WAIT_POLICY when another

OMP thread gets destructed

Classification: Unclassified

   Product: gcc

   Version: 4.6.3

Status: UNCONFIRMED

  Severity: normal

  Priority: P3

 Component: libgomp

AssignedTo: unassig...@gcc.gnu.org

ReportedBy: jk3...@arcor.de





So there are 2 bugs:

 * the omp workers of a boost::thread are ignoring OMP_WAIT_POLICY

 * once the boost::thread gets destructed the main-thread's omp worker's

WAIT_POLICY get lost



used to compile the example:

g++ -fopenmp -lgomp -lboost_system -lboost_thread-mt -o foo.bin -O2 foo_omp.c



tested with gentoo:

Just run the example with `export OMP_WAIT_POLICY=ACTIVE` and watch it in

another window with htop. First all created omp threads use 100%, then the

boost::thread and its omp workers are spawned (all with ~0% cpu usage, still

the main-thread's omp workers use 100%). Then the boost::thread gets destructed

and the main-threads omp workers fallback to 0% cpu usage.



PS: It would be nice if there was a GOMP_DEBUG to enable a more verbose output,

esp. to debug GOMP_SPINCOUNT  OMP_PROC_BIND.


[Bug libgomp/55411] OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed

2012-11-20 Thread jk3064 at arcor dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55411



--- Comment #1 from jk3064 at arcor dot de 2012-11-20 10:04:08 UTC ---

Created attachment 28742

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28742

example testcase



compile with: g++ -fopenmp -lgomp -lboost_system -lboost_thread-mt -o foo.bin

-O2 foo_omp.c


[Bug libgomp/55411] OMP threads lose their OMP_WAIT_POLICY when another OMP thread gets destructed

2012-11-20 Thread jk3064 at arcor dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55411



--- Comment #3 from jk3064 jk3064 at arcor dot de 2012-11-21 03:20:26 UTC ---

Created attachment 28748

  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=28748

pthread only testcase