all: use tracy for tracing
This commit is contained in:
parent
50186e764e
commit
ccad3cf0fb
56 changed files with 647 additions and 171 deletions
|
|
@ -35,6 +35,7 @@ impl ImgCopyWork {
|
|||
|
||||
impl CpuWork for ImgCopyWork {
|
||||
fn run(&mut self) -> Option<Box<dyn AsyncCpuWork>> {
|
||||
zone!("ImgCopyWork");
|
||||
for rect in &self.rects {
|
||||
let mut offset = rect.y1() * self.stride + rect.x1() * self.bpp;
|
||||
if rect.width() == self.width {
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ impl AsyncCpuWork for ReadWriteWorkConfig {
|
|||
completion: WorkCompletion,
|
||||
) -> SpawnedFuture<CompletedWork> {
|
||||
let ring = ring.clone();
|
||||
eng.spawn(async move {
|
||||
eng.spawn("shm read/write", async move {
|
||||
let res = loop {
|
||||
if self.cancel.cancelled.load(Relaxed) {
|
||||
break Err(ReadWriteJobError::Cancelled);
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ impl AsyncCpuWork for AsyncWork {
|
|||
completion: WorkCompletion,
|
||||
) -> SpawnedFuture<CompletedWork> {
|
||||
let ring = ring.clone();
|
||||
eng.spawn(async move {
|
||||
eng.spawn("", async move {
|
||||
let mut buf = [0; 8];
|
||||
let res = ring
|
||||
.read_no_cancel(self.0.borrow(), 0, &mut buf, |_| ())
|
||||
|
|
@ -90,7 +90,7 @@ fn run(cancel: bool) {
|
|||
work: Work(eventfd.clone()),
|
||||
cancel,
|
||||
}));
|
||||
let _fut1 = eng.spawn(async move {
|
||||
let _fut1 = eng.spawn("", async move {
|
||||
wheel.timeout(1).await.unwrap();
|
||||
if cancel {
|
||||
drop(pending_job);
|
||||
|
|
@ -99,7 +99,7 @@ fn run(cancel: bool) {
|
|||
pending::<()>().await;
|
||||
}
|
||||
});
|
||||
let _fut2 = eng.spawn(async move {
|
||||
let _fut2 = eng.spawn("", async move {
|
||||
ae.triggered().await;
|
||||
ring2.stop();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue