From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57058 invoked by alias); 12 Feb 2016 11:04:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 57046 invoked by uid 89); 12 Feb 2016 11:04:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=derived_whole, auxv, $tvar3, tvariable X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 12 Feb 2016 11:04:32 +0000 Received: from hogfather.0x04.net (89-65-66-135.dynamic.chello.pl [89.65.66.135]) by xyzzy.0x04.net (Postfix) with ESMTPS id CC7E33FE6A for ; Fri, 12 Feb 2016 12:05:20 +0100 (CET) Received: from [192.168.1.62] (84-10-2-59.static.chello.pl [84.10.2.59]) by hogfather.0x04.net (Postfix) with ESMTPSA id 5269B58008C for ; Fri, 12 Feb 2016 12:04:30 +0100 (CET) Subject: Re: [PATCH 0/8] gdb/s390: Add regular and fast tracepoint support. To: gdb-patches@sourceware.org References: <1453637529-26972-1-git-send-email-koriakin@0x04.net> From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <56BDBC3D.2080605@0x04.net> Date: Fri, 12 Feb 2016 11:04:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1453637529-26972-1-git-send-email-koriakin@0x04.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2016-02/txt/msg00403.txt.bz2 A few updates on the status... On 24/01/16 13:12, Marcin Kościelnicki wrote: > This patchset adds support for regular and fast tracepoints on > s390-ibm-linux-gnu and s390x-ibm-linux-gnu. It depends on the following > yet-unlanded patches: > > - https://sourceware.org/ml/gdb-patches/2016-01/msg00597.html (for 31-bit > fast tracepoint support) > - https://sourceware.org/ml/gdb-patches/2016-01/msg00596.html (just > a testsuite fix) These two have landed by now. > - https://sourceware.org/ml/gdb-patches/2016-01/msg00510.html (fixes > setting a breakpoint and a tracepoint on the same location) Still waiting for review. > > Patches 1-5 add working regular tracepoint support, patches 6-7 add > working fast tracepoint support on top of that, and patch 8 makes fast > tracepoints use compiled agent expressions. I have updated the first 5 patches and hope to get them pushed first; there are outstanding issues on #6 and #8 (doc comments, indents, reading auxv from /proc) which I will fix soon (when I'm done with issue (3) below). > > Patches 1 and 7 are in target-independent code, the remaining ones > are in s390-specific code. > > It has been tested on s390-ibm-linux-gnu and s390x-ibm-linux-gnu on > a z13 machine (without vector extensions). The parts handling vector > extensions are untested. It has also been regression-tested on x86_64. > > There are 2 test failures still left in gdb.trace: > > - gdb.trace/unavailable.exp: print derived_whole has 4 failures on 64-bit > only. The same failure happens on x86_64, so it's unlikely to be > s390-specific. > - gdb.trace/mi-tsv-changed.exp: create delete modify: tvariable $tvar3 > modified is an intermittent failure. It seems to be a race of some > kind - in the failing runs, gdb shows the same messages, but in > different order. I strongly suspect this is a target-independent > issues that only happens on s390 due to timing factors. > > There are also three issues affecting s390 tracepoints that don't show > up in the testsuite: > > 1. Target independent: tfile format doesn't contain target information > (tdesc). While this affects all platforms with multiple tdescs > (eg. x86_64 is unable to pull AVX registers from tfile for that > reason), it horribly breaks 31-bit s390 with high GPRs - it has > a completely different GPR layout from plain 31-bit s390, so the > collected registers will be garbled. I suppose the proper fix to > that would be to add tdesc information to tfile format. Unfortunately, > I don't see a way to extend it in a backwards-compatible way. This is fixed already. > 2. Target independent: 32-bit (or 31-bit for us) IPA cannot be used with > 64-bit gdbserver, due to communication involving lots of structs with > pointer types. Fixing that would be quite involved, but possible > (I don't suppose we have to maintain compatibility between IPA/gdbserver > from different gdb versions?). > > 3. s390 specific: 31-bit gdbserver doesn't know about high GPRs, and > cannot collect them if they're in use. Seems fixable with average > effort. Unfortunately, fixing that will break tfile, unless (1) > is fixed first... Since (1) is fixed, I'm going to work on that one now. > These three interact in bad ways, summarised below: > > - 64-bit linux, 64-bit gdbserver, 64-bit target: works OK, but you won't be > able to see VX registers in tfile. Works OK now, including VX in tfile. > > - 64-bit linux, 64-bit gdbserver, 31-bit target: > > - no fast tracepoint support due to (2) > - tfile completely broken due to (1) tfile should work now. > > - 64-bit linux, 31-bit gdbserver, 31-bit target: > > - works OK, but you won't be able to see VX registers or high GPRs at all, > due to (3) > - if (3) were fixed, tfile will be completely broken due to (1) Second line no longer applies. > > - 31-bit linux, 31-bit gdbserver, 31-bit target: works OK > > In summary, there's no way at all to use fast tracepoints on 31-bit target > if what you want to collect involves high GPRs. While there's support for > it in the IPA, it's currently disabled, to match what gdbserver supports. > > Fast tracepoint support assumes z900+ CPU. The g5/g6 CPUs only have jump > instuctions with +-64kiB of range, making them pretty much useless for > our purposes, so not much loss here. >