On Thu, Jul 13, 2017 at 02:11:16PM -0500, John D. Baker wrote:
> While I can follow the logic in "pmc.c", GCC with "-Os" cannot. Would
> the following patch be appropriate for appeasing GCC?
Would asserting that pmc_ncounters>0 help? (even in theory?)
Cheeers,
Patrick
On Thu, 13 Jul 2017, John D. Baker wrote:
> On Thu, 13 Jul 2017, John D. Baker wrote:
>
> > Would the following patch be appropriate for appeasing GCC?
>
> [snip]
>
> It allows compilation to succeed. Will test run-time soon. A quick
> look suggests CPU capability/feature detection is
On Thu, 13 Jul 2017, John D. Baker wrote:
> Would the following patch be appropriate for appeasing GCC?
[snip]
It allows compilation to succeed. Will test run-time soon. A quick
look suggests CPU capability/feature detection is sufficient to render
the pmc code inactive on the net4501.
--
Kernel configs like "NET4501" routinely include:
makeoptions "COPTS=-Os"
This causes GCC to emit warnings (treated as errors) if it thinks a
variable might be used uninitialized. For example, the following:
# compile NET4501_JDB/pmc.o
/r1/build/current/tools/amd64/bin/i486--netbsdelf-gcc