Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2558375rdg; Mon, 14 Aug 2023 06:30:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH53GSrCgnOfWKgvJ8/lh04BzgWSzAFWE8oqvLTFheJ8k4GLwtMySM4vjvpwRw1nr7m+rBz X-Received: by 2002:a2e:9783:0:b0:2b4:6d59:7863 with SMTP id y3-20020a2e9783000000b002b46d597863mr6475072lji.25.1692019834590; Mon, 14 Aug 2023 06:30:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1692019834; cv=pass; d=google.com; s=arc-20160816; b=hQjnsZdd8uwAKMwkqf2xXGhBgNJ6xNnHVsTC7pI1J7F5fypMAKLa5CL+1ciWQA7cuO 6BGkn4EJJd62vbUubbBZo1sEDoE4qMmxGnFp9Io6Td4oxv35V66VVWjhNZj5jSNBnWWB XWctOehwIlgQpboobDhV+3dh6ItFohomCwE5Ioof/jPnYOEhgtzymOFWR51dzBdqwFrt 6LMKPGoNatH4iD3LIVKWeRKG1yG3pHqAt17EFigEcQwcIMUrt6KHhBPV9Adb3XJ/8DzT 8LxAUHVtiGdcLBJ/AmCYUMNXsAgjq8ewoW+st3ouoTMpLDBj8rVIQW474vlJF0r0dEb6 H9gA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:organization:from:references:cc:to:content-language :subject:user-agent:date:message-id:dkim-signature:dkim-signature; bh=gq+cjWyOk/QIXZ3QQvrc223LhprCW0nOHbTRa5xXx0A=; fh=9tVeVRH+FB/YVGneRSo8B9uXrSGaMcgZO0DR4T7YnB4=; b=EgpvlD1CHfOMVNLKyUe1mg7F1dLo31/YxQedvsEcJeYMljHl7Jh1N/MTIm7Z95TSNj eDl/B8eVdEmyDm0gthx2e644mpPLE6r/XJ37u39fneDN+fBWJAb2ozimsjLF3vIep8fC GD8x6AHm7AonIWvMSA8kR5LVJ0XdWmbz8D3XlTsvCOiUfoVFI3z/ppqnY0vc6cw0mIUu A7H56QnnBnhqA5aKTdYs32y/vyWUtcvxBQ3EwfdOyrrzoExnVT1WgHGKeFgBpDAm+zfP +098eZ9/1D1C6+1Um5yYNREkbjswB2e80dx5U35zow6f0NQbLWuDBllzBL+K2Y0uTK/G kOnQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=KxSqw9N9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=z6aHM9Ff; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lc20-20020a170906f91400b0099cff319e90si8282705ejb.155.2023.08.14.06.30.09; Mon, 14 Aug 2023 06:30:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=KxSqw9N9; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=z6aHM9Ff; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229955AbjHNNIM (ORCPT + 99 others); Mon, 14 Aug 2023 09:08:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230380AbjHNNIC (ORCPT ); Mon, 14 Aug 2023 09:08:02 -0400 Received: from mx0a-00069f02.pphosted.com (mx0a-00069f02.pphosted.com [205.220.165.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D74211D; Mon, 14 Aug 2023 06:08:01 -0700 (PDT) Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37ECiarw026755; Mon, 14 Aug 2023 13:07:28 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=message-id : date : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2023-03-30; bh=gq+cjWyOk/QIXZ3QQvrc223LhprCW0nOHbTRa5xXx0A=; b=KxSqw9N9EfmxyBmPbiddHzy2GvsxdZK2ngJS7E0Wdwj6rm0vUmERQtyvZH6eYPyXFevG ecRBfv5gVBBQ9Xqj6eAOxDQiMXxRZGj/WseTyIuHT6cllDND/di78kHNRrinuY94Tt4O sVwiSxPq1kChHzxpSkLRsj5hMi51HIznDQ6rhOubKhuVDayzIylb0B864SeF372aIea6 e3l0xMqw/BRshEABN215OalSOtm9nF7vZ+mQkTUjT3bi+cbIp/9BpBQHkA09dWLy4NQv rF+C7HCstANnA7n3LzVmbM6DD2/pdMxw6X7BwUHSnVfxp2XxgkU6OYYO7jKyXqgyNhTl qA== Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3se2xwjj3w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Aug 2023 13:07:27 +0000 Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37EBUIKs003745; Mon, 14 Aug 2023 13:07:26 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2174.outbound.protection.outlook.com [104.47.73.174]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3sexygm8n9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 14 Aug 2023 13:07:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mx6F5V4hEThUOOd++Qphbb5x1gsdaoAlJU64sjvOKYAmskjeNi7uQnQBDHOPSW4Ic1eVTxvJm2scONOW/v6xYXxPJ2n7yaRcAMWOw3sOUlcLgxq6gkMpIUGVkvTwAU8sz8mAyEuwY++vTgjdB94cjk4Kabqu1Z5MfCbdX+F+5aXaHPSVR5JkNi+yuAs2OnhGAc18CZviuR0TVvULpWyo57YckH+cqv7KEMnHLgrYPOD9wAUX17TuVDAtTtW/a1anf0r/UMpadcQnM8Vjp50ET5BGUYXOv+MLwyeXy7+41dh7t0l6so/OEj+Lg22Lat/hbfbsU2+DZaPS7UHq6oEdxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gq+cjWyOk/QIXZ3QQvrc223LhprCW0nOHbTRa5xXx0A=; b=NMCd8NDyWQhKwWz654NM/YKanpUuVuxJec8vTu8Ki6ytmi2DkWA2RNrc6xFve2HuG33V4o6aX+j4+WDbfStEBqVdek81ZdjXvAcAAc2/46uP+QDT+FvPJo6IOx/CjjjEUiXCsPeFrf2vLEzY2iTLnctOyIzZA0lPRRjocWWNLR1IQ9QoZxe/uPQb6ofQjGmj9SOI79JdCRSKYQTaEKt1u1iqQxvpPq4bZZdIy1SluKwFv3SjZgUEhjDZPR6bTvMdEMdVVol1rHofJ8jjZSYm3Q/uUbR4posyL6AxTgX3v/zYglV5rB2MqgmqSZG+bAToKxSQmrok4XQtZ3roxsfCjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gq+cjWyOk/QIXZ3QQvrc223LhprCW0nOHbTRa5xXx0A=; b=z6aHM9FfzitENnNeQu/UgC/266DW+R93EYRRckT1wug1LMITz/FnJEsK3fE/xg/dSOHn9kBpE3wXRIcyTzz86oBCetqyc4bKwqPU9CU6SwEGCeBIEMMKFS3wfaW0eMOqU72r/TIAMn9xaDqlI6QF4xpwZu0ccY6tJSlu7crM3w0= Received: from DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) by DS7PR10MB5246.namprd10.prod.outlook.com (2603:10b6:5:3aa::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6678.26; Mon, 14 Aug 2023 13:07:23 +0000 Received: from DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ebfd:c49c:6b8:6fce]) by DM6PR10MB4313.namprd10.prod.outlook.com ([fe80::ebfd:c49c:6b8:6fce%7]) with mapi id 15.20.6678.022; Mon, 14 Aug 2023 13:07:23 +0000 Message-ID: <47a32410-d9ca-627b-e8a3-f64d4a1ea95f@oracle.com> Date: Mon, 14 Aug 2023 14:07:18 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 Subject: Re: [PATCH v5 2/6] perf arm64: Allow version comparisons of CPU IDs Content-Language: en-US To: James Clark , linux-perf-users@vger.kernel.org, irogers@google.com, renyu.zj@linux.alibaba.com Cc: Will Deacon , Mike Leach , Leo Yan , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Adrian Hunter , Suzuki K Poulose , Kan Liang , Nick Forrington , Kajol Jain , Eduard Zingerman , Sohom Datta , Rob Herring , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, coresight@lists.linaro.org References: <20230811144017.491628-1-james.clark@arm.com> <20230811144017.491628-3-james.clark@arm.com> From: John Garry Organization: Oracle Corporation In-Reply-To: <20230811144017.491628-3-james.clark@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO2P265CA0458.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:a2::14) To DM6PR10MB4313.namprd10.prod.outlook.com (2603:10b6:5:212::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR10MB4313:EE_|DS7PR10MB5246:EE_ X-MS-Office365-Filtering-Correlation-Id: ccd308d0-5b0d-4bb2-c381-08db9cc7663c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Vt8hlFrvZxG13gdGBbGn2+/A67vPzXIZVLZJQuY/T8fcEDMpxdDOtV04KgeYjkLKNOQD2z87Zzi6R/U2+GCTjoofmMyyTNGSbdKWevTB376DNVtDdIL+cFZ4F0Ld+9TQPIlBxoNHr2Vw1NSmyGiBP8wCIEs+J42rOfU3pV247vYP+jyAk9TnLgPA7jpjAU+XC3N2oXrcrPqGVm1Aj7EN99r/DVKWW9uTFVbVTkCWKR5qWGpyRpUC7wFFzQ8wVfjkih4NDn/m0QegqzYMReH1keBnMivh72QU+aQNR0e/8T+EHgHKcCYNuyC6ryEeBKbnS674FdSVmmZYRPI9MnIAJG73kZYoafTXIAeZ+koyOV0h5BQy0JfcieYbSC3EiAeWbUPnK6Bct3Px+RDNq9QwmJT2We427d67Dme1J9MmBa0a8s3bcM447Bro1D1IPS9hfY/kDWg1l+5FmEk2sUnc3uwf6XJQE0XOf2aFWJWnz0oR1elxSYwfqAlK9EViL5QJAenGQt8H7o4F7dnqTb2kv4v3A3Y0Teuu0ZXqT5sPFVSYtNaxWFAi+H61RTXDz1zlGnoG7fXyryK7YoMwkUuUiUCQAFCH+jPzRs1dsxH7Ws5ISY/TE9UTsFm5pbxVUGOAgooCgk4jr5/GaaSfTPB7Mw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR10MB4313.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(376002)(136003)(366004)(396003)(346002)(39860400002)(1800799006)(186006)(451199021)(36916002)(6666004)(6506007)(6486002)(6512007)(53546011)(478600001)(2616005)(83380400001)(26005)(2906002)(7416002)(54906003)(41300700001)(66556008)(316002)(66946007)(66476007)(5660300002)(8676002)(8936002)(4326008)(31696002)(38100700002)(36756003)(86362001)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?THptMlgwTVhZcUR6Y3ZwTDhIOFFLaWRINXNWWEN0WGI1NExkTVl6a0xtWUJR?= =?utf-8?B?NHJ2cUpqbERzUUkzSmw3Z1psTUdSb1luMys3VWtnYTdlMUxEV0hXOHc0OHJq?= =?utf-8?B?bXNRdzhaejdjb3ZKRzFrTXdnZGtrcllrVjVEb3I4WHg3RG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VlKV2dzcGR1cHR3eld2OWlQUktvQWMwejlP?= =?utf-8?B?dnpHTTZYKzNTaG9LUEYwcG00enpWYjdScnVraHNXdG5uQVc2alp2cFBBOThL?= =?utf-8?B?Ujl1Nkg2Sml5T1E2Y0h2UGh0M2c5S0E9PQ==?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: ccd308d0-5b0d-4bb2-c381-08db9cc7663c X-MS-Exchange-CrossTenant-AuthSource: DM6PR10MB4313.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Aug 2023 13:07:23.4310 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /yblXiU19q+ek+5jALOBx+sX6c5VycfPMs9hDBUwXan1WpG1tz8txR2rrIN6NLHJkpgP3ALbosxdt4Ojk/T72A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5246 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-14_09,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 phishscore=0 suspectscore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308140121 X-Proofpoint-ORIG-GUID: USDBYQZKhFSon-OJiVLbQiX819dxL5kO X-Proofpoint-GUID: USDBYQZKhFSon-OJiVLbQiX819dxL5kO X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/08/2023 15:39, James Clark wrote: > Currently variant and revision fields are masked out of the MIDR so > it's not possible to compare different versions of the same CPU. > In a later commit a workaround will be removed just for N2 r0p3, so > enable comparisons on version. > > This has the side effect of changing the MIDR stored in the header of > the perf.data file to no longer have masked version fields. Did you consider adding a raw version of _get_cpuid(), which returns the full MIDR just for the purpose of caller strcmp_cpuid_str()? I can't comment on how it will be called in relation to strcmp_cpuid_str(), as I am unsure whether strcmp_cpuid_str() should be just in arch arm64 code - see comment on later patch. It also > affects the lookups in mapfile.csv, but as that currently only has > zeroed version fields, it has no actual effect. The mapfile.csv > documentation also states to zero the version fields, so unless this > isn't done it will continue to have no effect. > > Signed-off-by: James Clark > --- > tools/perf/arch/arm64/util/header.c | 64 ++++++++++++++++++++++------- > 1 file changed, 50 insertions(+), 14 deletions(-) > > diff --git a/tools/perf/arch/arm64/util/header.c b/tools/perf/arch/arm64/util/header.c > index 80b9f6287fe2..8f74e801e1ab 100644 > --- a/tools/perf/arch/arm64/util/header.c > +++ b/tools/perf/arch/arm64/util/header.c > @@ -1,3 +1,6 @@ > +#include > +#include > +#include > #include > #include > #include > @@ -10,14 +13,12 @@ > > #define MIDR "/regs/identification/midr_el1" > #define MIDR_SIZE 19 > -#define MIDR_REVISION_MASK 0xf > -#define MIDR_VARIANT_SHIFT 20 > -#define MIDR_VARIANT_MASK (0xf << MIDR_VARIANT_SHIFT) > +#define MIDR_REVISION_MASK GENMASK(3, 0) > +#define MIDR_VARIANT_MASK GENMASK(23, 20) > > static int _get_cpuid(char *buf, size_t sz, struct perf_cpu_map *cpus) > { > const char *sysfs = sysfs__mountpoint(); > - u64 midr = 0; > int cpu; > > if (!sysfs || sz < MIDR_SIZE) > @@ -44,21 +45,11 @@ static int _get_cpuid(char *buf, size_t sz, struct perf_cpu_map *cpus) > } > fclose(file); > > - /* Ignore/clear Variant[23:20] and > - * Revision[3:0] of MIDR > - */ > - midr = strtoul(buf, NULL, 16); > - midr &= (~(MIDR_VARIANT_MASK | MIDR_REVISION_MASK)); > - scnprintf(buf, MIDR_SIZE, "0x%016lx", midr); > /* got midr break loop */ > break; > } > > perf_cpu_map__put(cpus); > - > - if (!midr) > - return EINVAL; > - > return 0; > } > > @@ -99,3 +90,48 @@ char *get_cpuid_str(struct perf_pmu *pmu) > > return buf; > } > + > +/* > + * Return 0 if idstr is a higher or equal to version of the same part as > + * mapcpuid. > + * > + * Therefore, if mapcpuid has 0 for revision and variant then any version of > + * idstr will match as long as it's the same CPU type. > + */ > +int strcmp_cpuid_str(const char *mapcpuid, const char *idstr) should we check implementator and other fields as a sanity check? > +{ > + u64 map_id = strtoull(mapcpuid, NULL, 16); > + char map_id_variant = FIELD_GET(MIDR_VARIANT_MASK, map_id); > + char map_id_revision = FIELD_GET(MIDR_REVISION_MASK, map_id); > + u64 id = strtoull(idstr, NULL, 16); > + char id_variant = FIELD_GET(MIDR_VARIANT_MASK, id); > + char id_revision = FIELD_GET(MIDR_REVISION_MASK, id); > + u64 id_fields = ~(MIDR_VARIANT_MASK | MIDR_REVISION_MASK); > + > + /* Compare without version first */ > + if ((map_id & id_fields) != (id & id_fields)) > + return 1; > + > + /* > + * ID matches, now compare version. > + * > + * Arm revisions (like r0p0) are compared here like two digit semver > + * values eg. 1.3 < 2.0 < 2.1 < 2.2. The events json file with the > + * highest matching version is used. > + * > + * r = high value = 'Variant' field in MIDR > + * p = low value = 'Revision' field in MIDR > + * > + */ > + if (id_variant > map_id_variant) > + return 0; > + > + if (id_variant == map_id_variant && id_revision >= map_id_revision) > + return 0; > + > + /* > + * variant is less than mapfile variant or variants are the same but > + * the revision doesn't match. Return no match. > + */ > + return 1; > +} Thanks, John