From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 560194B859 for ; Mon, 17 Jun 2024 11:15:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E8F6B68D769; Mon, 17 Jun 2024 14:15:54 +0300 (EEST) Received: from mail-lf1-f47.google.com (mail-lf1-f47.google.com [209.85.167.47]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7A91268BD43 for ; Mon, 17 Jun 2024 14:15:48 +0300 (EEST) Received: by mail-lf1-f47.google.com with SMTP id 2adb3069b0e04-52c8ddc2b29so4639029e87.3 for ; Mon, 17 Jun 2024 04:15:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1718622947; x=1719227747; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:from:to:cc:subject:date:message-id:reply-to; bh=xhR4zj1kqZG7TMNeAMTn9q37vB6l/e3uaL2BUgSbnQk=; b=2pk2c4wtGmIBT0hTD9CNXuNuWvfzKpYo4uWARM7z1jMvYhBO8GU0zRxouXsSJvi7+U ZYtFcs6Ph3YlfJMUZQkO/xPDNf03bc3+d+fOFlHdBVf6DaAqGvsktSMKVzvy+3X3Qg9b lc/eLwnVj8kpcVKrImvOHTx2FfsZvlqhFvLmJ4AFnMoeR8ElDqH9REc3r/yHVLUtBjA5 aiZd9QEgZG4EbqAtJPwtjKDimX0hcHjptAqSPv71NRPMt3Ht5/ti+vKYgKmDnV73ek45 7on/kYcr3XxGry6SfqRfxwfALdQwc4Zf05dDAFXrTZVPkslb8/2aUK5ZpEymx7m3wEen Gfdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718622947; x=1719227747; h=mime-version:references:message-id:in-reply-to:subject:cc:to:from :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=xhR4zj1kqZG7TMNeAMTn9q37vB6l/e3uaL2BUgSbnQk=; b=OsRmpjIuojhTdc2iPjlks1CjA+iJcXB8NAvd8HediYR6SYWmnUdpB1XQWxN9UIUujD 1yca43QV1N2xc0WfNBhKLLYqgLOthAc8/fjWqqYl2pZaOQ0AG+VkJUp1AEn3i9wrN3E7 dAh/SGcAZ1jYSsAD/ItJ+By9FGWJqPM73PKY+E8ipTqs7I7UIn3uIfIXfYLQKirFnRRg mB8jA07M7YLLChbFa13o4L6Aw48p68LGcrJR0fnnAPWcfo6of+vxCCET/toP+eW/ay5n 9hmL5muomLDgvsJp/EnFLL7P/iXjg7xsZutKARitwN0Cc4IrAAL18kbQZZi3972AYbFA JKLQ== X-Gm-Message-State: AOJu0YysjFrdZwTv79LQAkxtc2JcsFF0G3PSTDGYG/37s1chX2MCGgc4 CErvdxrJc/VmQYLl7h/69WS3RyX/VN0CkvCRtO91xxPdam+AoxSqrDCTGt1QU9mkpNdpFKH8yy3 NPQ== X-Google-Smtp-Source: AGHT+IEAZkvnIvDrzkOGjCn02cKtln59xsps1ahyttVVMwrRN3NgBlM99deKvbLtExYVg3r+Dg05jw== X-Received: by 2002:a05:6512:33cf:b0:52c:8d5d:bf83 with SMTP id 2adb3069b0e04-52ca6e9b0d7mr9215019e87.64.1718622947538; Mon, 17 Jun 2024 04:15:47 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52caec1ff35sm794856e87.247.2024.06.17.04.15.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Jun 2024 04:15:46 -0700 (PDT) Date: Mon, 17 Jun 2024 14:15:45 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: Message-ID: <934fa88-8b2f-98f9-2f6d-47d16587f93c@martin.st> References: MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 1/2] avutil/timer: define macos kperf as AV_READ_TIME X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Zhao Zhili Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 12 Jun 2024, Zhao Zhili wrote: > From: Zhao Zhili > > Firstly, make ff_kperf_cycles as an implementation of AV_READ_TIME > avoids code duplication. > > Secondly, fix compilation error since 6a18c0bc87e when macos-kperf > is enabled. mach_time.h is included only when CONFIG_MACOS_KPERF > is 0. The error happened due to define mach_absolute_time as > AV_READ_TIME but missing include mach_time.h. Define macos kperf > as AV_READ_TIME fixed the issue. Can you elaborate on what your actual goal is here? We have relatively little use of AV_READ_TIME (mostly START/STOP_TIMER), while most benchmarking these days is done via checkasm. Do you have a real case where you want to do benchmarking with this api, outside of checkasm? Or do you just want to fix the compilation error? In that case I guess it's possible to fix differently by adding the missing includes. By doing this change, we'd be adding one call to ff_thread_once to every single invocation of the timers - which seems suboptimal (even if it probably is quite quick). We don't use Linux perf for AV_READ_TIME either, we only use it in checkasm. So I'd prefer not to do this change, especially unless you have a concrete case where you actively desire to use START/STOP_TIMER benchmarking with macOS kperf? // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".