Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Martin Storsjö" <martin@martin.st>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Cc: Zhao Zhili <zhilizhao@tencent.com>
Subject: Re: [FFmpeg-devel] [PATCH 1/2] avutil/timer: define macos kperf as AV_READ_TIME
Date: Mon, 17 Jun 2024 14:22:33 +0300 (EEST)
Message-ID: <a87cd781-9444-2127-932b-af1e5a481889@martin.st> (raw)
In-Reply-To: <934fa88-8b2f-98f9-2f6d-47d16587f93c@martin.st>

On Mon, 17 Jun 2024, Martin Storsjö wrote:

> On Wed, 12 Jun 2024, Zhao Zhili wrote:
>
>> From: Zhao Zhili <zhilizhao@tencent.com>
>> 
>> 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.

Btw, in this case, the compilation error also went away when I pushed the 
patch that made it use inline assembly with cntvct_el0 on macOS too.

But as long as we do have the common AV_READ_TIME fallback to 
mach_absolute_time, we definitely should include the right header for that 
case anyway.

// 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".

  reply	other threads:[~2024-06-17 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-12 15:22 Zhao Zhili
2024-06-16  6:40 ` Zhao Zhili
2024-06-17 11:15 ` Martin Storsjö
2024-06-17 11:22   ` Martin Storsjö [this message]
2024-06-17 11:48   ` Zhao Zhili
2024-06-17 11:53     ` Martin Storsjö

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=a87cd781-9444-2127-932b-af1e5a481889@martin.st \
    --to=martin@martin.st \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=zhilizhao@tencent.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

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git