| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
Without this, nest HTM commands target nothing.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
This adds an option to suppress progress:
-S, --shutup
Shut up those annoying progress bars
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
| |
This makes palmettos use kernel backend on bmc using coldfire driver.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Depending on the selection flags passed to pdbg not all threads will be
selected. This was leading to random uninitialised values being used to print
thread status for unselected threads. Instead nothing should be printed for
those threads.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Acked-by: Nicholas Piggin <npiggin@gmail.com>
|
|
|
|
|
|
|
| |
Also removes the "release" command from pdbg which should no longer be
necessary as pdbg will automatically call release to clean-up.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
This doesn't seem to be used for anything and simply creates another target
state which adds complexity. Either a target was released or it wasn't (because
it's children have not been released).
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
This allows calling parse_list() multiple times to incrementally keep
selecting entries for options -p/-c/-t/-l.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
The selection should be applied to all the linux cpus in the list and
not just the first one.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
Reviewed-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the PPC host backend used for HTM it's difficult to match up the
hardware numbers used pdbg with linux CPU numbers that people want to
affinitise a workload against (ie. taskset -c <cpu number>).
This adds a new "-l <cpu>" options so users can address the CPU to
target using linux CPU numbers. This is only available when using the
host backend on POWER machines.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 60d0ab1a23ae02bc4ea361899731d8b710920c99.
This is fixed by:
ca56cd36d6 main: Init list of procs/cores/threads
Also causes problem when implementing -l option (future patch which
address Linux CPUs) as [plc]_count won't be set and will result in us
returning early.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
| |
Validate read() before calling __adu_putmem().
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
| |
Make sure target class is not NULL before comparision.
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
|
|
|
|
|
|
| |
These are just on the stack so will contain anything.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Remove reset, dump and analyse. Add record.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the problem of incorrectly selecting threads for following
command-line without any thread specification.
pdbg -p 0 -c 0 ...
Before iterating through [pct]_list, confirm that [pct]_count > 0.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
| |
This isn't used and just complicates things.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following commit change the way htm is run causing all htm
commands to fail.
commit 92006e53c927472d62ee1637e6ad6cad35b53d5e
Author: Alistair Popple <alistair@popple.id.au>
Date: Wed Jun 20 15:34:09 2018 +1000
pdbg: Use new command parsing
This fixes it by correctly setting the return code.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
| |
This switches all commands except the htm command to use the new command/option
parsing code. For the moment we leave the usage help and generic targeting flag
processing alone, but future changes should allow this to also use the common
parsing code.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
We don't really have infrastructure in place to easily add/build/run tests,
but that shouldn't stop them being written. This adds some basic tests of
the argument parsing logic.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Parsers need to take a string argument and convert it into a specific type,
returning the value as a pointer to memory allocated by the parser (or NULL in
the case of an error). This just defines a couple of common parsers useful for
various commands.
It also defines a couple of convenience macros for easier usage of these
parsers.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add code to support command argument and flag parsing. A future patch will
update existing code to use these parsers.
The idea behind this code is to allow easily calling C functions from the
command line without requiring shim/boilerplate functions to marshal arguments
and flags which can be repetitive and error prone.
In general a command consists of positional arguments and non-positional flags
which optionally take arguments as shown below:
cmd_name <arg1> <arg2> ... <argN> --flag1=<arg?> --flag2 ... --flagM
It supports default values for the last N postional arguments which allows
trailing arguments to be made optional. The above definition allows a function
with the following prototype to be called directly without any manual shim code:
cmd_name(arg1, arg2, ... argN, flags)
Where `flags` is a struct defined elsewhere containing fields which will match
with the flag specification.
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
|
|
|
|
| |
"htm record" is set to non-wrapping mode
"htm start" is in wrapping mode since it's assumed "htm stop" will
stop it.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
| |
This starts the trace, waits for it to complete (ie fill the buffer),
then stops the trace and dumps out the file.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Alistair Popple <alistair@popple.id.au>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
Base/size aren't needed so remove them.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
| |
These don't really make and sense. We are going to make things
simpler with start, stop, dump and also add a record commands that
does it all.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
|
| |
It's not only devices that have the AMI i2c path that can use pdbg over
i2c.
I chose not to plumb in the access check, as this can be done
when attempting to open the device (otherwise we're duplicating that
check).
Signed-off-by: Joel Stanley <joel@jms.id.au>
|
|
|
|
|
|
|
|
|
|
| |
Currently we always generate 0.0-htm.dump irrespective of the chip,
core and thread it's generated from.
This changes it to htm-p??-c??-t??.dump using the correct CPU being
run on.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
|
| |
Remove unused arguments.
Remove unused pause command.
Make < 80 cols
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
| |
Actually print something in status output. Drop some of the more
esoteric details to PR_INFO()
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
htm only works in SMT1 mode, check for that.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
| |
These have been marked deprecated for a while and are just taking up
room in the help, so let's remove them.
The are replaced with "htm core|nest [options]"
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
|
|
|
| |
This bumps up the MAX_PROCESSORS to 64 so we support more machines.
On a Tuletta with 2 DCMS, we end up with chip ids 0, 1, 16 and
17. We can't use the last two chips with the current setting.
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
| |
Signed-off-by: Michael Neuling <mikey@neuling.org>
|
|
|
|
|
|
| |
This avoids large usage message obscuring the actual error message.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
| |
This avoids the large usage message obscuring the actual errors from
parsing options. Print usage only if an option is invalid.
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Support explicit multiple target selection using ranges and lists.
For options -p/-c/-t, support the following valid arguments:
3
0-7
1,2,3
0-5,7,9-11,17,19
For loss of sanity, make sense of the following valid arguments:
3,3,3,3,3,3
1-6,2-5
1,2,3,0-7
Conjunction of -p/-c/-t with -a also works and it's insensitive to order
of options specified.
-a -c 1,2 processors 0-max; chips 1-2; threads 0-max
-p 0 -c 0 -a processors 0; chips 0; threads 0-max
-a -c 1 -t 1 processors 0-max; chips 1; threads 1
Signed-off-by: Amitay Isaacs <amitay@ozlabs.org>
|