Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
94 user(s) are online (57 user(s) are browsing Forums)

Members: 0
Guests: 94

more...

Headlines

Forum Index


Board index » All Posts




Re: Tracing
Home away from home
Home away from home


@Joerg
Then what it all mean is that : When we have "workbench" name in the task/process name with its 500 counts of CallHookPkt() - we do have only name of process from which this all happens, but not directly : i.e. we don' see there that workbench do call layers.library, or graphics.library, we only see that some process were involved in calling CallHookPkt(). But how can be detect _what_ exactly call it ? I.e. not the process from which we invoke it originally, but what call the CallHookPkt under the hood ?

Of course probably the best way will be to use GDB or db101/spotless, and instruction by instruction find out how the way from user application till final CallHookPkt() passed , but maybe it possible to trace without debugger and in more automatic way ?

@LiveForIt
Quote:

Hook can be simple function pointer, does need to be a utility.library hook.


But then it's not a casual utility-like hook, but a self-made one, the ones we didn't count there. And IMHO most of amigaos4 libs do use CallHookPkt (at least even in old os3 times, ASL library already used CallHookPkt, and even string.gadget too)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Tracing
Just can't stay away
Just can't stay away


@kas1e
Quote:
But ! It can be very well, that most libraries do not use CallHookPkt() directly, but instead, self-made CallHook() from amiga.lib (or so), meaning that it still provide hooking functionality, but not via CallHookPkt() ?
Should only be the case if you are using AmigaOS <= 3.x/m68k software, or AmigaOS 4.x ports which weren't fixed.
Although CallHookPkt() is an AmigaOS 2.0 function a lot of AmigaOS <= 3.9 software didn't use it but called the h_entry function directly, or used an obsolte libamiga.a function (for Kickstart 1.x compatibility) doing that instead.

From the utility.library/CallHookPkt AutoDoc:
This form of transparency comes at a priceh_Entry must not be jumped
        to directly
, as calling 68k legacy code from native code will result in
        a crash
, and calling native code from 68k legacy code will result in
        native code being interpreted 
as 68k codewith completely unpredictable
        results
.

Go to top


Re: Tracing
Home away from home
Home away from home


I think many libs use CallHook() from amiga.lib, instead of "modern" CallHookPkt() which were created later ? At least intuition for sure (at least on old os3)

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Tracing
Home away from home
Home away from home


@kas1e

Perhaps devices is its own thing,

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top


Re: Tracing
Home away from home
Home away from home


@Joerg
But again, we can see only name of process/task, but we can't see from which else it come too. I mean, Workbench can use asl, layers, etc. But in log we will see just "Workbench" task

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Tracing
Home away from home
Home away from home


@joerg

Hook can be simple function pointer, does need to be a utility.library hook.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top


Re: Tracing
Home away from home
Home away from home


@joerg
At least i checked it like this:

int a;

ULONG APICALL Patched_CallHookPkt(struct UtilityIFace *Selfstruct Hook *HookAPTR objectAPTR message
{

a++;

return 
blablalba
}

int main(balbal)

{
bablab

<ctrl+c handler>

printf a;


So it did count all counts to CallHookPkt() and i see none of them coming from anything else than Dos_server and Workbnech.

But ! It can be very well, that most libraries do not use CallHookPkt() directly, but instead, self-made CallHook() from amiga.lib (or so), meaning that it still provide hooking functionality, but not via CallHookPkt() ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Tracing
Just can't stay away
Just can't stay away


@kas1e
I would have expected much more calls/s.
layers and graphics (for example the BackFill Hooks), intuition (incl. all BOOPSI gadgets, images and data types, Windows alpha/shape/scrolling/etc., ...), IIRC Dockies (AmiDock) as well, and a lot more in AmigaOS uses Hooks.

Go to top


Re: AmigaOS 4.1 Final Edition Update 2 fatal failure
Just popping in
Just popping in


@MamePPCA1

Personally, I've tried these backup programs before, but end up giving up. Not sure what it was but they can get stuck if a file system has errors. I tend to go back to Workbench even though that has flaws.

Both are old designs and a strange mix. One is 68K so using old DOS functions but simple enough. The other is updated for OS4 but still using an old interface and is slightly confusing to use.

I'd use the older BackUp given the choice. Just needs source and destination. But, you could also just use a tool like DirOpus. That may be the easier option.

Go to top


Re: Tracing
Home away from home
Home away from home


For now count how many CallHookPkt's happens in the system when we do nothing , but have loaded up ONLY plain WB (no amidock, nothing else) : 50 per second. This is "Workbench" and "dos_signal_server".

If i fire-up amidock with all my realtime dokies, then amount of CallHookPkt calls is start to be about ~250 calls per second in summary with system's ones!


Btw, is there any possible way , to trace, what function from given process/task call the CallHookPkt() ? I mean, not the application's one, but the library's one it uses. I.e. i want to trace let's say some code where developer create asl.library's hook to filter screenmodes via ASL_Hook, and then, this one in the ASL itself do use CallHookPkt() : but i want to know from which library's function this CallHookPkt() call is to come (taking into account that i do not know that it is come from asl.library, as i only see the call to patched CallHookPkt).

Should i probabaly take all system libraryes, find out all functions providing hooking functionality, and trace them as well ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Tracing
Home away from home
Home away from home


@kas1e

Process task, interrupts have the name in the node structure.
(just be careful, some nodes might not have a name, its optional)

See the exec.h header files in sdk:include/include_h/protos/exce/

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top


Re: Tracing
Home away from home
Home away from home


@joerg
Right!

@liveforit,joerg

So.. if interrupts are also the category which can call CallHookPkt(), how can i trace them too ? My main goal is just to do that:

1). Absolute count of all CallHookPkt() in the loaded system: that easy, just count + printf.

2). Count per second all the processes and whatever else (interrupts?) and on exit out name of the tasm/process/etc, the time is spend and amount of CallHookPkt calls.

Just want theoretically know, how many of them, and co.

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Greaseweazle V4 on AmigaOS 4.x?
Just popping in
Just popping in


I took a look at the code on GitHub (https://github.com/keirf/greaseweazle/tree/master/). That code base is written in Python 3.8, so I can understand why they would not want to maintain a Python 2.5 target along with all the libraries our native OS4 Python does not support.

What I'm thinking now is that I'll stick an RPI in my case, have the PI talk to the Greaseweasle, and build a Hollywood GUI to send commands to the PI to work with the floppy. Should not be all that hard to create something that detects a floppy insert and automates the process to have that floppy popup on the workbench :)

Cheers,
Bill "tekmage" Borsari

Go to top


Re: Tracing
Just can't stay away
Just can't stay away


@kas1e
It doesn't make any difference if you use struct Process or struct Task when using
if (IS_PROCESS(process))
The fist part of struct Process is struct Task and as long as you only access the struct Task parts there is no problem.
Only access struct Process parts after you have checked that it's a DOS Process and not an Exec Task.

If you don't want to use macros and struct Process you can use something like
if (NT_PROCESS == process->pr_Task.tc_Node.ln_Type)

Go to top


Re: Tracing
Home away from home
Home away from home


@kas1e


Quote:
Now, do we have only processes and tasks in the system which may use CallHookPkt() ?


I think interrupts can be a 3RD category.

We don’t have threads, or anything like that, so its mainly tasks and processes.

(NutsAboutAmiga)

Basilisk II for AmigaOS4
AmigaInputAnywhere
Excalibur
and other tools and apps.
Go to top


Re: Tracing
Home away from home
Home away from home


@LiveForIt
Thanks ! That it ! Through i had to add also check on cli->cli_Module too, to be sure that this is Cli command loaded, and not something like Workbench process.

Now, do we have only processes and tasks in the system which may use CallHookPkt() ?

I want now not only check what exactly MY binary do, but i also want to count every CallHookPkt() calls from every task/process/etc on the system.

I.e. i want to count, how many CallHookPkt() calls happens in all the task/proccess/whatever_else in the fully loaded system per 1 second.

So far i think to do it like this:

1. That code to check process. Count what process how many times calls the CallHookPkt(), and print out time and amount on exit.

2. if not process , then it is a task (right ?), so then we do in opposite:

struct Task *task = (struct Task *)IExec->FindTask(NULL); 
....


That right ?

Join us to improve dopus5!
AmigaOS4 on youtube
Go to top


Re: Greaseweazle V4 on AmigaOS 4.x?
Just popping in
Just popping in


@LiveForIt

Then they don't seem interested in the Amiga either. What about Amiga users with USB ports? There's plenty of Amigas with USB ports. This could be a way to have a HD drive. Plus it also puts Mac users out.

Anyway serial shouldn't slow it down. As USB is serial. It should be using the fast USB transfer for any serial as it's built in.

But while a 68K, OS4 and Mac/Linux driver could be written, I don't think that's the way to go. If possible a generic solution would be best. The USB floppy protocol allows for variable geometry so I think coding it to the USB standard would be best and allow it to work on all platforms without proprietary drivers. As it stands right now it's locked to being a Windows only product that really needs an Amiga emulator to work.

Go to top


Re: Compiling qemu X64 for OS4.1 (Ryzen) and also other CPU (MAC)
Quite a regular
Quite a regular


@joerg
@all

Thanks for the info.
I bought two USB-Audio years ago, spending now I don't remember, let's say 15-20 euros to make them work with Morphos through qemu.

A video card like this one for example with the exact specifications:
EBAY
https://tinyurl.com/2c699sf6

clearly I have to have the characteristics sent to me as per specifications.
so preferably I should see in the Italian ads.

The part that interested me was this:

Apart from the Drivers.

Is the card recognized even without drivers?
I mean on real AmigaOS hardware it is recognized regardless of the drivers.


And then later you install the necessary drivers.
A bit like in the old Windows XP it was initially recognized as Hardware and then enabled 100% with the proprietary Drivers?

Anyone who has real hardware could answer this

Thank you,
As I already specified in another post some time ago
My motherboard with the Ryzen 5800 is this:

https://www.asus.com/motherboards-comp ... ing/tuf-gaming-b550-plus/

It seems clear that it is simply my choice to make this purchase.

If it doesn't work, that's my problem

Radeon HD 7800 Series
Product ID: 0x6810, Vendor ID: 0x1002
Sub-Product ID: 0x3030, Sub-Vendor ID: 0x1462
2 GB RAM
RadeonHD.chip version 3.7

Go to top


Re: New staff member
Just popping in
Just popping in


@orgin

Nice. That oughta keep them in line. Secret staff with a naughty stick.

Go to top


Re: AmigaOS 4.1 Final Edition Update 2 fatal failure
Just can't stay away
Just can't stay away


@MamePPCA1
Quote:
Now I have the gtlayout library installed and SFSSalv it works and run well but my partitions,the OS4.1 ones appear.
SFSSalv only supports SFS\0 partitions, not SFS\2 ones.

Go to top



TopTop
« 1 2 (3) 4 5 6 ... 7221 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project