From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13387 invoked by alias); 11 Sep 2013 17:32:20 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 13379 invoked by uid 89); 11 Sep 2013 17:32:19 -0000 Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 11 Sep 2013 17:32:19 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,NO_RELAYS autolearn=ham version=3.3.2 X-HELO: mail-lb0-f175.google.com Received: by mail-lb0-f175.google.com with SMTP id y6so7611519lbh.6 for ; Wed, 11 Sep 2013 10:32:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=LicZDZjE/+8IK2ez7lkP7IeXraEY2JNWKzCOFNzCsuw=; b=KzuYCT+BtuFIvnPfE9/4XtBFqdbKl/sInqicaW9pPDqlmwPwQYqzT9HD/StamrvqHB q79+dJirGVgwxqiL2JeJe52Xtt7U4Ej2fDQewQYdRWx+No/xt8HhZ2urT3TE127XLTrj 0bKRwyzmmmvXmlfuYPaHIuHg1v5dfYw4pgvG8SXvYw6gheh6zdT88Hzm0XKvQi2+Pfwq otZlYU+H66Y8+//kd48ZSWA/KGgXkKf5Q4AdBoEWINZPo+aRh9ze/F5VTxhz+GDkUd0f ugVbCU5BI9SuY141Q70xdXy+vbrtDKtDhRUUExE9PV47E342MgwnEJc51jJAtN/n9AZp xn4g== X-Gm-Message-State: ALoCoQknLZgPaD8zvXHpQ0ypkunqViKhrOcBxbzY40DP/9ErmnEgw/Tr5jHes9lXtGui3VLDIWvq MIME-Version: 1.0 X-Received: by 10.112.51.101 with SMTP id j5mr3514078lbo.17.1378920735311; Wed, 11 Sep 2013 10:32:15 -0700 (PDT) Received: by 10.114.69.174 with HTTP; Wed, 11 Sep 2013 10:32:15 -0700 (PDT) Date: Wed, 11 Sep 2013 17:32:00 -0000 Message-ID: Subject: DTRACE_PROBE macro fails to compile with Clang++ From: Martin Martin To: systemtap@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes X-SW-Source: 2013-q3/txt/msg00302.txt.bz2 The following code: #include int main() { DTRACE_PROBE(a, b); } compiles with with G++, but when compiled with clang++ 3.3 gives: clang++ dtrace_probe.cpp dtrace_probe.cpp:4:5: error: unknown flag DTRACE_PROBE(a, b); ^ /usr/include/sys/sdt.h:362:3: note: expanded from macro 'DTRACE_PROBE' STAP_PROBE(provider,probe) ^ /usr/include/sys/sdt.h:254:3: note: expanded from macro 'STAP_PROBE' _SDT_PROBE(provider, name, 0, ()) ^ /usr/include/sys/sdt.h:36:27: note: expanded from macro '_SDT_PROBE' __asm__ __volatile__ (_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/include/sys/sdt.h:43:31: note: expanded from macro '_SDT_ASM_3' # define _SDT_ASM_3(a, b, c) _SDT_S(a) "," _SDT_S(b) "," \ ^ /usr/include/sys/sdt.h:40:22: note: expanded from macro '_SDT_S' # define _SDT_S(x) #x ^ :9:2: note: expanded from here ".pushsection .note.stapsdt" ^ :2:31: note: instantiated into assembly here .pushsection .note.stapsdt,"?","note" ^ dtrace_probe.cpp:4:5: error: .popsection without corresponding .pushsection DTRACE_PROBE(a, b); ^ /usr/include/sys/sdt.h:362:3: note: expanded from macro 'DTRACE_PROBE' STAP_PROBE(provider,probe) ^ /usr/include/sys/sdt.h:254:3: note: expanded from macro 'STAP_PROBE' _SDT_PROBE(provider, name, 0, ()) ^ /usr/include/sys/sdt.h:36:27: note: expanded from macro '_SDT_PROBE' __asm__ __volatile__ (_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/include/sys/sdt.h:41:26: note: expanded from macro '_SDT_ASM_1' # define _SDT_ASM_1(x) _SDT_S(x) "\n" ^ /usr/include/sys/sdt.h:40:22: note: expanded from macro '_SDT_S' # define _SDT_S(x) #x ^ :29:2: note: expanded from here ".popsection" ^ :14:12: note: instantiated into assembly here .popsection ^ dtrace_probe.cpp:4:5: error: expected '@' or '%' before type DTRACE_PROBE(a, b); ^ /usr/include/sys/sdt.h:362:3: note: expanded from macro 'DTRACE_PROBE' STAP_PROBE(provider,probe) ^ /usr/include/sys/sdt.h:254:3: note: expanded from macro 'STAP_PROBE' _SDT_PROBE(provider, name, 0, ()) ^ /usr/include/sys/sdt.h:38:27: note: expanded from macro '_SDT_PROBE' __asm__ __volatile__ (_SDT_ASM_BASE); \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/include/sys/sdt.h:45:36: note: expanded from macro '_SDT_ASM_5' # define _SDT_ASM_5(a, b, c, d, e) _SDT_S(a) "," _SDT_S(b) "," \ ^ /usr/include/sys/sdt.h:40:22: note: expanded from macro '_SDT_S' # define _SDT_S(x) #x ^ :32:2: note: expanded from here ".pushsection .stapsdt.base" ^ :2:33: note: instantiated into assembly here .pushsection .stapsdt.base,"aG","progbits",.stapsdt.base,comdat ^ dtrace_probe.cpp:4:5: error: .popsection without corresponding .pushsection DTRACE_PROBE(a, b); ^ /usr/include/sys/sdt.h:362:3: note: expanded from macro 'DTRACE_PROBE' STAP_PROBE(provider,probe) ^ /usr/include/sys/sdt.h:254:3: note: expanded from macro 'STAP_PROBE' _SDT_PROBE(provider, name, 0, ()) ^ /usr/include/sys/sdt.h:38:27: note: expanded from macro '_SDT_PROBE' __asm__ __volatile__ (_SDT_ASM_BASE); \ ^ note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all) /usr/include/sys/sdt.h:41:26: note: expanded from macro '_SDT_ASM_1' # define _SDT_ASM_1(x) _SDT_S(x) "\n" ^ /usr/include/sys/sdt.h:40:22: note: expanded from macro '_SDT_S' # define _SDT_S(x) #x ^ :42:2: note: expanded from here ".popsection" ^ :7:12: note: instantiated into assembly here .popsection ^ 4 errors generated. $ clang++ --version clang version 3.3 (tags/RELEASE_33/final) Target: x86_64-unknown-linux-gnu Thread model: posix