diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-06-01 23:10:58 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-06-03 02:05:43 +0200 |
commit | 3f46833df94eec3b7057181898e02cb9e4a49074 (patch) | |
tree | eb0300141a8e1635af137b2de40010d16f71b6a2 /drivers/nvdimm | |
parent | linvdimm, pmem: Preserve read-only setting for pmem devices (diff) | |
download | linux-3f46833df94eec3b7057181898e02cb9e4a49074.tar.xz linux-3f46833df94eec3b7057181898e02cb9e4a49074.zip |
libnvdimm: Debug probe times
Instrument nvdimm_bus_probe() to emit timestamps for the start and end
of libnvdimm device probing. This is useful for identifying sources of
libnvdimm sub-system initialization latency.
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/bus.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/nvdimm/bus.c b/drivers/nvdimm/bus.c index b9e0d30e317a..27902a8799b1 100644 --- a/drivers/nvdimm/bus.c +++ b/drivers/nvdimm/bus.c @@ -100,6 +100,9 @@ static int nvdimm_bus_probe(struct device *dev) if (!try_module_get(provider)) return -ENXIO; + dev_dbg(&nvdimm_bus->dev, "START: %s.probe(%s)\n", + dev->driver->name, dev_name(dev)); + nvdimm_bus_probe_start(nvdimm_bus); rc = nd_drv->probe(dev); if (rc == 0) @@ -108,7 +111,7 @@ static int nvdimm_bus_probe(struct device *dev) nd_region_disable(nvdimm_bus, dev); nvdimm_bus_probe_end(nvdimm_bus); - dev_dbg(&nvdimm_bus->dev, "%s.probe(%s) = %d\n", dev->driver->name, + dev_dbg(&nvdimm_bus->dev, "END: %s.probe(%s) = %d\n", dev->driver->name, dev_name(dev), rc); if (rc != 0) |