Flexible I/O Tester development
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Alireza Haghdoost <haghdoost@gmail.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: competime_assert failure without -O3 optimization flag expected ?
Date: Mon, 29 Jun 2015 09:47:09 -0600	[thread overview]
Message-ID: <5591687D.6040803@kernel.dk> (raw)
In-Reply-To: <CAB-428=biE+PMVOA8qg_VcH9bf0ZVZO1dimXVh3KC3Z7j=QrmQ@mail.gmail.com>

On 06/29/2015 08:46 AM, Alireza Haghdoost wrote:
>> +struct all_io_list *get_all_io_list(int save_mask, size_t *sz)
>> +{
>> +       struct all_io_list *rep;
>> +       struct thread_data *td;
>> +       size_t depth;
>> +       void *next;
>> +       int i, nr;
>> +
>> +       compiletime_assert(sizeof(struct all_io_list) == 8, "all_io_list");
>
>
> I am getting compile time assertion failure on the following line of
> code when I remove the optimization flag (-O3) in the Makefile. Is
> this something expected ? I want to remove optimizations in order to
> debug my code based on original source code line order not optimized
> code order.

Yeah it's expected, but should be fixed. I just haven't looked into why 
the compiletime_assert() fails if optimizations are disabled. It really 
shouldn't, since the size of the struct is still 8 when disabled. So 
it's a bug in the compiletime_assert() code. Feel free to poke at it :-)

-- 
Jens Axboe



  reply	other threads:[~2015-06-29 15:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 14:46 competime_assert failure without -O3 optimization flag expected ? Alireza Haghdoost
2015-06-29 15:47 ` Jens Axboe [this message]
2015-06-29 15:53   ` Alireza Haghdoost
2015-06-29 15:55     ` Jens Axboe
2015-06-29 16:04       ` Jens Axboe
2015-06-29 17:42         ` Alireza Haghdoost
2015-06-29 17:50           ` Jens Axboe
2015-06-29 18:25             ` Alireza Haghdoost
2015-06-29 18:29               ` Jens Axboe
2015-06-29 18:58                 ` Alireza Haghdoost
2015-06-29 19:11                   ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5591687D.6040803@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=fio@vger.kernel.org \
    --cc=haghdoost@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox