Commit graph

797 commits

Author SHA1 Message Date
Linux Build Service Account
f5753d9d9d Merge "msm: thermal: Add ftrace logs in KTM" 2014-08-14 14:23:59 -07:00
Olav Haugan
df91ad278c sched: Make RAVG_HIST_SIZE tunable
Make RAVG_HIST_SIZE available from /proc/sys/kernel/sched_ravg_hist_size
to allow tuning of the size of the history that is used in computation
of task demand.

CRs-fixed: 706138
Change-Id: Id54c1e4b6e974a62d787070a0af1b4e8ce3b4be6
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2014-08-12 11:15:20 -07:00
Srivatsa Vaddagiri
1f12e6698c sched: Extend ftrace event to record boost and reason code
Add a new ftrace event to record changes to boost setting. Also extend
sched_task_load() ftrace event to record boost setting and reason code
passed to select_best_cpu(). This will be useful for debug purpose.

Change-Id: Idac72f86d954472abe9f88a8db184343b7730287
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2014-08-12 10:51:28 -07:00
Venkat Gopalakrishnan
7fe6d9abe5 mmc: sdhci: Add tracepoints to enhance debugging
Instrument the sdhci driver with tracepoints to aid in
debugging issues and identifying latencies in the following
path:
* CMD completion
* DATA completion
* DMA preparation
* Post DMA cleanup

Change-Id: Ie8cd0c2fb6c1bd6ab13883123be021081f8b8f78
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2014-08-01 17:29:25 -07:00
Archana Sathyakumar
7cefdbe2ee msm-core: Supplement scheduler core selection using power estimates
The msm-core driver provides per-core temperature and power for every
P-state (frequency/capacity) to the scheduler.
The objective of the driver is to compute the power consumed
at every P-state so as to make power efficient scheduling decisions.
     Dynamic power = fn (V, f)
     where V is voltage at the frequency f

The power computation and temperature read for all cores happen at
regular intervals (deferrable) unless there is a change in temperature
or frequency.

Change-Id: I2737145955d23e0dfbfabc134ce3e1e73c3e36a1
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>
2014-07-25 14:06:39 -06:00
Shiju Mathew
84a7a5722b msm: thermal: Add ftrace logs in KTM
Add ftrace logs in KTM. This would log core offline
and online as well as core frequency updates in
ftrace.

Change-Id: I02b6c047b2cbb9c042ee6a64d9fc849087dcb635
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
2014-07-23 19:36:14 -04:00
Srivatsa Vaddagiri
11262c23d6 sched: Add new trace events
Add trace events for update_task_ravg(), update_history(), and
set_task_cpu(). These tracepoints are useful for monitoring the
per-task and per-runqueue demand statistics.

Change-Id: Ibec9f945074ff31d1fc1a76ae37c40c8fea8cda9
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2014-07-22 14:22:59 -07:00
Steve Muckle
dd76a2e00a sched: add affinity, task load information to sched tracepoints
Knowing the affinity mask and CPU usage of a task is helpful
in understanding the behavior of the system. Affinity information
has been added to the enq_deq trace event, and the migration
tracepoint now reports the load of the task migrated.

Change-Id: I29d8a610292b4dfeeb8fe16174e9d4dc196649b7
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2014-07-22 14:22:58 -07:00
Srivatsa Vaddagiri
e26b419bbb sched: Add additional ftrace events
This patch adds two ftrace events:

sched_task_load -> records information of a task, such as scaled demand
sched_cpu_load  -> records information of a cpu, such as nr_running,
		   nr_big_tasks etc

This will be useful to debug HMP related task placement decisions by
scheduler.

Change-Id: If91587149bcd9bed157b5d2bfdecc3c3bf6652ff
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2014-07-22 14:20:34 -07:00
Srivatsa Vaddagiri
8694768715 sched: Update sched_enq_deq_task ftrace event
Extend sched_enq_deq_task ftrace event to record task's
runnable_avg_sum_scaled, runnable_avg_period and demand metrics. This
will be a valuable debug aid.

Change-Id: I8deda0df0105cf97a3178cded96473d541e0d78a
Signed-off-by: Srivatsa Vaddagiri <vatsa@codeaurora.org>
2014-07-22 14:20:30 -07:00
Neha Atri
1bd424de5e gpu: ion: add ftrace events for secure calls
Track secure heap allocations for debug purposes.

Change-Id: I1810fce8c48e6420a97bb9f3ac9dde19792e7903
CRs-Fixed: 686802
Signed-off-by: Neha Atri <natri@codeaurora.org>
2014-07-10 16:54:09 -07:00
Lee Susman
5021cdab66 scsi: ufs: add trace event for ufs commands
Use the ftrace infrastructure to conditionally trace ufs command events.
New trace event is created, which samples the following ufs command data:
- device name
- optional identification string
- task tag
- doorbell register
- number of transfer bytes
- interrupt status register
- request start LBA
- command opcode

Currently we only fully trace read(10) and write(10) commands.
All other commands which pass through ufshcd_send_command() will be
printed with "-1" in the lba and transfer_len fields.

Usage:
	echo 1 > /sys/kernel/debug/tracing/events/ufs/enable
	cat /sys/kernel/debug/tracing/trace_pipe

Change-Id: Id6e16a8c0b2a833c5453ed9923384f641e374a71
Signed-off-by: Lee Susman <lsusman@codeaurora.org>
2014-06-24 17:28:50 +03:00
Linux Build Service Account
874d6dfc10 Merge "msm: vidc: Add trace events" 2014-06-20 18:39:33 -07:00
Shalaj Jain
41caebbf89 msm: vidc: Add trace events
Add trace events for ETBs/FTBs, buffer allocation and mappings,
fw load times etc.

Change-Id: Ie57db1ddbad886e78f8d0a6e5eaac06206a6c53d
Signed-off-by: Shalaj Jain <shalajj@codeaurora.org>
2014-06-19 15:51:20 -07:00
Mahesh Sivasubramanian
d38bbf5417 cpuidle: lpm-levels: Add ftrace logging for idle low power modes
Add ftrace events to log entry/exit of cluster and cpu low power modes.
Also, add events to log parameters passed down to secure code during
power collapse.

Change-Id: I76e2faf63a80155509d6e3e610db1daa611c0b6a
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
2014-06-18 09:46:43 -06:00
Linux Build Service Account
16296e0178 Merge "Merge upstream linux-stable v3.10.36 into msm-3.10" 2014-05-05 15:09:00 -07:00
Linux Build Service Account
63832c38f9 Merge "USB: ice40-hcd: Add optimization to improve read throughput" 2014-04-26 00:53:44 -07:00
Linux Build Service Account
e101d0ebff Merge "USB: ice40-hcd: Add optimization to improve write throughput" 2014-04-26 00:53:43 -07:00
Tarun Gupta
dfcf674249 USB: ice40-hcd: Add optimization to improve read throughput
This change clubs the various register read/write in xfer_in in single
SPI message. Avoids using individual messages for every SPI command with
this we can avoid unnecessary context switches. This also implements double
buffering to make use of two FIFO's avaialble for efficient bus bandwidth
utilizaion of USB BUS.

CRs-Fixed: 646320
Change-Id: I48aefc62bcbf899d8f787dda34fe20841858ab5b
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>
2014-04-25 11:28:47 +05:30
Tarun Gupta
575a2f9562 USB: ice40-hcd: Add optimization to improve write throughput
This change clubs the various register read/write in xfer_out in single
SPI message instead of using multiple messages with this we can avoid
unnecessary context switches. This also implements double buffering to make
use of two FIFO's avaialble for efficient bus bandwidth utilizaion of
USB BUS.

CRs-Fixed: 646320
Change-Id: I583d73b9b61e110b370c97e1b72392c2af0d1cee
Signed-off-by: Tarun Gupta <tarung@codeaurora.org>
2014-04-25 10:01:45 +05:30
Girish Mahadevan
e6c7c9265d msm: msm_bus: Introduce new dynamic throttling scheme
Introduce a new dynamic throttling scheme for certain "non-real time"
masters based on the available bus bandwidth and the currently voted
bandwidth requirements of some "real time" masters.

Change-Id: Icf019f89bbe2425c706f2fc49884f41110a78299
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2014-04-24 13:17:35 -06:00
Ian Maund
356fb13538 Merge upstream linux-stable v3.10.36 into msm-3.10
* commit 'v3.10.36': (494 commits)
  Linux 3.10.36
  netfilter: nf_conntrack_dccp: fix skb_header_pointer API usages
  mm: close PageTail race
  net: mvneta: rename MVNETA_GMAC2_PSC_ENABLE to MVNETA_GMAC2_PCS_ENABLE
  x86: fix boot on uniprocessor systems
  Input: cypress_ps2 - don't report as a button pads
  Input: synaptics - add manual min/max quirk for ThinkPad X240
  Input: synaptics - add manual min/max quirk
  Input: mousedev - fix race when creating mixed device
  ext4: atomically set inode->i_flags in ext4_set_inode_flags()
  Linux 3.10.35
  sched/autogroup: Fix race with task_groups list
  e100: Fix "disabling already-disabled device" warning
  xhci: Fix resume issues on Renesas chips in Samsung laptops
  Input: wacom - make sure touch_max is set for touch devices
  KVM: VMX: fix use after free of vmx->loaded_vmcs
  KVM: x86: handle invalid root_hpa everywhere
  KVM: MMU: handle invalid root_hpa at __direct_map
  Input: elantech - improve clickpad detection
  ARM: highbank: avoid L2 cache smc calls when PL310 is not present
  ...

Change-Id: Ib68f565291702c53df09e914e637930c5d3e5310
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-04-23 16:23:49 -07:00
Dan Sneddon
f378620a39 msm: msm_bus: Fix bus scaling tracing compile time error
Move the bus scaling trace file to a non-architecture specific
location since the bus scaling device driver is compiled on
multiple architectures.

Change-Id: Ia39818aa18a35e2ccb1780db0149789439c3d391
Signed-off-by: Dan Sneddon <dsneddon@codeaurora.org>
2014-03-31 14:01:20 -06:00
Vaibhav Nagarnaik
a1c10a94ff tracing: Fix array size mismatch in format string
commit 87291347c49dc40aa339f587b209618201c2e527 upstream.

In event format strings, the array size is reported in two locations.
One in array subscript and then via the "size:" attribute. The values
reported there have a mismatch.

For e.g., in sched:sched_switch the prev_comm and next_comm character
arrays have subscript values as [32] where as the actual field size is
16.

name: sched_switch
ID: 301
format:
        field:unsigned short common_type;       offset:0;       size:2; signed:0;
        field:unsigned char common_flags;       offset:2;       size:1; signed:0;
        field:unsigned char common_preempt_count;       offset:3;       size:1;signed:0;
        field:int common_pid;   offset:4;       size:4; signed:1;

        field:char prev_comm[32];       offset:8;       size:16;        signed:1;
        field:pid_t prev_pid;   offset:24;      size:4; signed:1;
        field:int prev_prio;    offset:28;      size:4; signed:1;
        field:long prev_state;  offset:32;      size:8; signed:1;
        field:char next_comm[32];       offset:40;      size:16;        signed:1;
        field:pid_t next_pid;   offset:56;      size:4; signed:1;
        field:int next_prio;    offset:60;      size:4; signed:1;

After bisection, the following commit was blamed:
92edca0 tracing: Use direct field, type and system names

This commit removes the duplication of strings for field->name and
field->type assuming that all the strings passed in
__trace_define_field() are immutable. This is not true for arrays, where
the type string is created in event_storage variable and field->type for
all array fields points to event_storage.

Use __stringify() to create a string constant for the type string.

Also, get rid of event_storage and event_storage_mutex that are not
needed anymore.

also, an added benefit is that this reduces the overhead of events a bit more:

   text    data     bss     dec     hex filename
8424787 2036472 1302528 11763787         b3804b vmlinux
8420814 2036408 1302528 11759750         b37086 vmlinux.patched

Link: http://lkml.kernel.org/r/1392349908-29685-1-git-send-email-vnagarnaik@google.com

Cc: Laurent Chavey <chavey@google.com>
Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-31 09:58:12 -07:00
Linux Build Service Account
b198cb9af1 Merge "Merge upstream linux-stable v3.10.28 into msm-3.10" 2014-03-26 23:36:07 -07:00
Ian Maund
f1b32d4e47 Merge upstream linux-stable v3.10.28 into msm-3.10
The following commits have been reverted from this merge, as they are
known to introduce new bugs and are currently incompatible with our
audio implementation. Investigation of these commits is ongoing, and
they are expected to be brought in at a later time:

86e6de7 ALSA: compress: fix drain calls blocking other compress functions (v6)
16442d4 ALSA: compress: fix drain calls blocking other compress functions

This merge commit also includes a change in block, necessary for
compilation. Upstream has modified elevator_init_fn to prevent race
conditions, requring updates to row_init_queue and test_init_queue.

* commit 'v3.10.28': (1964 commits)
  Linux 3.10.28
  ARM: 7938/1: OMAP4/highbank: Flush L2 cache before disabling
  drm/i915: Don't grab crtc mutexes in intel_modeset_gem_init()
  serial: amba-pl011: use port lock to guard control register access
  mm: Make {,set}page_address() static inline if WANT_PAGE_VIRTUAL
  md/raid5: Fix possible confusion when multiple write errors occur.
  md/raid10: fix two bugs in handling of known-bad-blocks.
  md/raid10: fix bug when raid10 recovery fails to recover a block.
  md: fix problem when adding device to read-only array with bitmap.
  drm/i915: fix DDI PLLs HW state readout code
  nilfs2: fix segctor bug that causes file system corruption
  thp: fix copy_page_rep GPF by testing is_huge_zero_pmd once only
  ftrace/x86: Load ftrace_ops in parameter not the variable holding it
  SELinux: Fix possible NULL pointer dereference in selinux_inode_permission()
  writeback: Fix data corruption on NFS
  hwmon: (coretemp) Fix truncated name of alarm attributes
  vfs: In d_path don't call d_dname on a mount point
  staging: comedi: adl_pci9111: fix incorrect irq passed to request_irq()
  staging: comedi: addi_apci_1032: fix subdevice type/flags bug
  mm/memory-failure.c: recheck PageHuge() after hugetlb page migrate successfully
  GFS2: Increase i_writecount during gfs2_setattr_chown
  perf/x86/amd/ibs: Fix waking up from S3 for AMD family 10h
  perf scripting perl: Fix build error on Fedora 12
  ARM: 7815/1: kexec: offline non panic CPUs on Kdump panic
  Linux 3.10.27
  sched: Guarantee new group-entities always have weight
  sched: Fix hrtimer_cancel()/rq->lock deadlock
  sched: Fix cfs_bandwidth misuse of hrtimer_expires_remaining
  sched: Fix race on toggling cfs_bandwidth_used
  x86, fpu, amd: Clear exceptions in AMD FXSAVE workaround
  netfilter: nf_nat: fix access to uninitialized buffer in IRC NAT helper
  SCSI: sd: Reduce buffer size for vpd request
  intel_pstate: Add X86_FEATURE_APERFMPERF to cpu match parameters.
  mac80211: move "bufferable MMPDU" check to fix AP mode scan
  ACPI / Battery: Add a _BIX quirk for NEC LZ750/LS
  ACPI / TPM: fix memory leak when walking ACPI namespace
  mfd: rtsx_pcr: Disable interrupts before cancelling delayed works
  clk: exynos5250: fix sysmmu_mfc{l,r} gate clocks
  clk: samsung: exynos5250: Add CLK_IGNORE_UNUSED flag for the sysreg clock
  clk: samsung: exynos4: Correct SRC_MFC register
  clk: clk-divider: fix divisor > 255 bug
  ahci: add PCI ID for Marvell 88SE9170 SATA controller
  parisc: Ensure full cache coherency for kmap/kunmap
  drm/nouveau/bios: make jump conditional
  ARM: shmobile: mackerel: Fix coherent DMA mask
  ARM: shmobile: armadillo: Fix coherent DMA mask
  ARM: shmobile: kzm9g: Fix coherent DMA mask
  ARM: dts: exynos5250: Fix MDMA0 clock number
  ARM: fix "bad mode in ... handler" message for undefined instructions
  ARM: fix footbridge clockevent device
  net: Loosen constraints for recalculating checksum in skb_segment()
  bridge: use spin_lock_bh() in br_multicast_set_hash_max
  netpoll: Fix missing TXQ unlock and and OOPS.
  net: llc: fix use after free in llc_ui_recvmsg
  virtio-net: fix refill races during restore
  virtio_net: don't leak memory or block when too many frags
  virtio-net: make all RX paths handle errors consistently
  virtio_net: fix error handling for mergeable buffers
  vlan: Fix header ops passthru when doing TX VLAN offload.
  net: rose: restore old recvmsg behavior
  rds: prevent dereference of a NULL device
  ipv6: always set the new created dst's from in ip6_rt_copy
  net: fec: fix potential use after free
  hamradio/yam: fix info leak in ioctl
  drivers/net/hamradio: Integer overflow in hdlcdrv_ioctl()
  net: inet_diag: zero out uninitialized idiag_{src,dst} fields
  ip_gre: fix msg_name parsing for recvfrom/recvmsg
  net: unix: allow bind to fail on mutex lock
  ipv6: fix illegal mac_header comparison on 32bit
  netvsc: don't flush peers notifying work during setting mtu
  tg3: Initialize REG_BASE_ADDR at PCI config offset 120 to 0
  net: unix: allow set_peek_off to fail
  net: drop_monitor: fix the value of maxattr
  ipv6: don't count addrconf generated routes against gc limit
  packet: fix send path when running with proto == 0
  virtio: delete napi structures from netdev before releasing memory
  macvtap: signal truncated packets
  tun: update file current position
  macvtap: update file current position
  macvtap: Do not double-count received packets
  rds: prevent BUG_ON triggered on congestion update to loopback
  net: do not pretend FRAGLIST support
  IPv6: Fixed support for blackhole and prohibit routes
  HID: Revert "Revert "HID: Fix logitech-dj: missing Unifying device issue""
  gpio-rcar: R-Car GPIO IRQ share interrupt
  clocksource: em_sti: Set cpu_possible_mask to fix SMP broadcast
  irqchip: renesas-irqc: Fix irqc_probe error handling
  Linux 3.10.26
  sh: add EXPORT_SYMBOL(min_low_pfn) and EXPORT_SYMBOL(max_low_pfn) to sh_ksyms_32.c
  ext4: fix bigalloc regression
  arm64: Use Normal NonCacheable memory for writecombine
  arm64: Do not flush the D-cache for anonymous pages
  arm64: Avoid cache flushing in flush_dcache_page()
  ARM: KVM: arch_timers: zero CNTVOFF upon return to host
  ARM: hyp: initialize CNTVOFF to zero
  clocksource: arch_timer: use virtual counters
  arm64: Remove unused cpu_name ascii in arch/arm64/mm/proc.S
  arm64: dts: Reserve the memory used for secondary CPU release address
  arm64: check for number of arguments in syscall_get/set_arguments()
  arm64: fix possible invalid FPSIMD initialization state
  ...

Change-Id: Ia0e5d71b536ab49ec3a1179d59238c05bdd03106
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-03-24 14:28:34 -07:00
Subhash Jadavani
b8acd9db12 scsi: ufs: add additional tracing messages
This patch adds following tracing messages:
 - Add support to trace the automatic background operations enable/disable
   events.
 - Add addition logs to trace the UFS device and UFS link state during
   suspend/resume and initialization.

Change-Id: I732b255296042442e50278c2700c52bd166e1d8b
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
2014-03-22 05:51:41 -07:00
Pavankumar Kondeti
5fb21f786e USB: ice40-hcd: Add ICE40 FPGA based SPI to Inter-Chip USB host driver
The ICE40 Host controller driver (ice40-hcd) is registered as a SPI
protocol driver and interacts with the SPI subsystem on one side and
interacts with the USB core on the other side. It supports only 1
Full-Speed port. The bridge chip does not maintain any port states.
Root hub port logic is simulated in the software. Control and Bulk
transfers are supported.

Change-Id: I927b4561a928f3eaa287351c4f82a5bef0cab76a
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2014-03-10 11:18:35 +05:30
Siddartha Mohanadoss
d689dc60d5 thermal: trace_thermal: Fix compilation
Include trace thermal header file in trace directory to
avoid compile errors when compiling standalone kernel image.

Change-Id: I69eba04e66bf9c2575310e988470741374af0c83
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2014-03-03 14:23:56 -08:00
Sarang Joshi
fdb945350e coresight: add event to abort tracing late on kernel panic
We call coresight_abort() early in panic pathway to avoid trace buffer
getting cluttered with uninteresting messages; however sometimes it tends
to loose important info such as kernel sending notification to all
peripheral subsystems since it happens after aborting of CoreSight trace.
Add trace event to abort tracing late in kernel panic.
trace_event_kernel_panic and trace_event_kernel_panic_late are mutually
exclusive and can be control using module parameter. With this change user
will be able to choose whether to abort CoreSight trace early or late on
kernel panic.

Change-Id: I84cc299823d929fdf8129c9c728282b32391b7c1
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
2014-02-24 12:31:50 -08:00
Sarang Joshi
87d84607d7 coresight: add event to abort tracing on kernel panic
Add trace event to control aborting CoreSight trace
dynamically based on module parameter. This will help
user to enable/disable coresight_abort on kernel panic.
Also moved CREATE_TRACE_POINTS to panic.c from fault.c
since panic.c is common and shared between 32 and 64
bit platforms.

Change-Id: I51e4049b07adeca571b1a98cd90ff5f307d1d794
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
2014-02-21 16:41:14 -08:00
Murali Nalajala
ced0c96338 msm: move rpm-smd trace event header to new kernel directory
Move rpm-smd trace event header from mach-msm to generic tarce
events folder.

Change-Id: I74b32ac0a8a0de2d37c3fa691caef64a868517b6
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2014-02-08 19:36:52 +05:30
Murali Nalajala
204ebec0d8 msm: msm: move PM trace event header to new kernel directory
Move PM trace event header from mach-msm to generic tarce
events folder.

Change-Id: I8216cde1b8ff76f6228792d4635ea23dfe409a6b
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
2014-02-08 19:36:16 +05:30
Laura Abbott
250adcdc98 gpu: ion: Add trace events for secure cma
Secure CMA allocates and stores memory differently than regular
heaps. This means the regular trace events for tracking allocation
time may not tell the whole story. Add secure CMA specific trace
events for events such as prefetching and shrinking to better collect
data.

Change-Id: I58ce8eb9e94ea380bece6bd75c7ba899a3ebc781
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2014-01-29 20:24:05 -08:00
Sahitya Tummala
a7e17c0f1a scsi: ufs: Add support for clock scaling using devfreq framework
The clocks for UFS device will be managed by generic DVFS (Dynamic
Voltage and Frequency Scaling) framework within kernel. This devfreq
framework works with different governors to scale the clocks. By default,
UFS devices uses simple_ondemand governor which scales the clocks up if
the load is more than upthreshold and scales down if the load is less than
downthreshold.

Change-Id: I1c3944a5b1771b967c1df3e441a75fd584d6e2a5
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2014-01-13 15:26:44 +05:30
Sahitya Tummala
9c35c51531 scsi: ufs: Add support for clock gating
The UFS controller clocks can be gated after certain period of
inactivity, which is typically less than runtime suspend timeout.
In addition to clocks the link will also be put into Hibern8 mode
to save more power.

The clock gating can be turned on by enabling the capability
UFSHCD_CAP_CLK_GATING. To enable entering into Hibern8 mode as part of
clock gating, set the capability UFSHCD_CAP_HIBERN8_WITH_CLK_GATING.

The tracing events for clock gating can be enabled through debugfs as:
echo 1 > /sys/kernel/debug/tracing/events/ufs/ufshcd_clk_gating/enable
cat /sys/kernel/debug/tracing/trace_pipe

Change-Id: I3e5e7e78130941ad7109fc05a46d7c3720245a1a
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2013-12-30 14:59:52 +05:30
Linux Build Service Account
cd45ce66b0 Merge "cpufreq: interactive: Remove trace event from idle_start handler" 2013-12-10 17:15:21 -08:00
Linux Build Service Account
c584668721 Merge "mmc: core: Add trace events to profile mmc suspend-resume" 2013-12-10 05:56:40 -08:00
Rohit Gupta
cdd6914bb7 cpufreq: interactive: Remove trace event from idle_start handler
Removed the trace_cpufreq_interactive_idle_start.
Also fix a crash resulting from accessing NULL policy before taking
the pcpu->enable_sem lock. The policy can be NULL if the core is
hotplugged out before the enable_sem lock is taken.

Change-Id: I7e2809cc016b3b383a44cdf3c697013e2d2b5417
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2013-12-09 19:22:27 -08:00
Rohit Gupta
b6cd9b3352 cpufreq: interactive: Reset floor_validate_time if busy at max for 100ms
When the interactive governor selects to run at max frequency it doesn't
re-schedule the timer until it hits an idle. This change checks if the CPU
has been continuously busy for last 100ms on hitting an idle start. If yes,
then floor_validate_time is reset so that the CPU stays at max frequency
for at least another 100 ms before stepping down.
This is an important feature for detecting CPU intensive workloads which
require high frequencies for achieving better performance.

Change-Id: I7d48ffbc3d50a80af9be3bf94667ee3d0120b763
Signed-off-by: Rohit Gupta <rohgup@codeaurora.org>
2013-12-06 16:43:07 -08:00
Sujit Reddy Thumma
23a6e13dd1 mmc: core: Add trace events to profile mmc suspend-resume
Add trace events to capture mmc suspend-resume latencies.
This would be useful to capture latencies for variety
of MMC/SD cards and decide on best possible runtime PM timeout.

Usage -
cd /sys/kernel/debug
echo 1 > tracing/events/mmc/mmc_resume_host/enable
echo 1 > tracing/events/mmc/mmc_suspend_host/enable
cat tracing/trace_pipe

Change-Id: Ic3a73753d55985c1c663cf2972cbed320e0fcfc3
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-12-06 14:56:49 +05:30
Steven Rostedt (Red Hat)
1bfdf02fc0 tracing: Allow events to have NULL strings
commit 4e58e54754dc1fec21c3a9e824bc108b05fdf46e upstream.

If an TRACE_EVENT() uses __assign_str() or __get_str on a NULL pointer
then the following oops will happen:

BUG: unable to handle kernel NULL pointer dereference at   (null)
IP: [<c127a17b>] strlen+0x10/0x1a
*pde = 00000000 ^M
Oops: 0000 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 0 Comm: swapper/1 Not tainted 3.13.0-rc1-test+ #2
Hardware name:                  /DG965MQ, BIOS MQ96510J.86A.0372.2006.0605.1717 06/05/2006^M
task: f5cde9f0 ti: f5e5e000 task.ti: f5e5e000
EIP: 0060:[<c127a17b>] EFLAGS: 00210046 CPU: 1
EIP is at strlen+0x10/0x1a
EAX: 00000000 EBX: c2472da8 ECX: ffffffff EDX: c2472da8
ESI: c1c5e5fc EDI: 00000000 EBP: f5e5fe84 ESP: f5e5fe80
 DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
CR0: 8005003b CR2: 00000000 CR3: 01f32000 CR4: 000007d0
Stack:
 f5f18b90 f5e5feb8 c10687a8 0759004f 00000005 00000005 00000005 00200046
 00000002 00000000 c1082a93 f56c7e28 c2472da8 c1082a93 f5e5fee4 c106bc61^M
 00000000 c1082a93 00000000 00000000 00000001 00200046 00200082 00000000
Call Trace:
 [<c10687a8>] ftrace_raw_event_lock+0x39/0xc0
 [<c1082a93>] ? ktime_get+0x29/0x69
 [<c1082a93>] ? ktime_get+0x29/0x69
 [<c106bc61>] lock_release+0x57/0x1a5
 [<c1082a93>] ? ktime_get+0x29/0x69
 [<c10824dd>] read_seqcount_begin.constprop.7+0x4d/0x75
 [<c1082a93>] ? ktime_get+0x29/0x69^M
 [<c1082a93>] ktime_get+0x29/0x69
 [<c108a46a>] __tick_nohz_idle_enter+0x1e/0x426
 [<c10690e8>] ? lock_release_holdtime.part.19+0x48/0x4d
 [<c10bc184>] ? time_hardirqs_off+0xe/0x28
 [<c1068c82>] ? trace_hardirqs_off_caller+0x3f/0xaf
 [<c108a8cb>] tick_nohz_idle_enter+0x59/0x62
 [<c1079242>] cpu_startup_entry+0x64/0x192
 [<c102299c>] start_secondary+0x277/0x27c
Code: 90 89 c6 89 d0 88 c4 ac 38 e0 74 09 84 c0 75 f7 be 01 00 00 00 89 f0 48 5e 5d c3 55 89 e5 57 66 66 66 66 90 83 c9 ff 89 c7 31 c0 <f2> ae f7 d1 8d 41 ff 5f 5d c3 55 89 e5 57 66 66 66 66 90 31 ff
EIP: [<c127a17b>] strlen+0x10/0x1a SS:ESP 0068:f5e5fe80
CR2: 0000000000000000
---[ end trace 01bc47bf519ec1b2 ]---

New tracepoints have been added that have allowed for NULL pointers
being assigned to strings. To fix this, change the TRACE_EVENT() code
to check for NULL and if it is, it will assign "(null)" to it instead
(similar to what glibc printf does).

Reported-by: Shuah Khan <shuah.kh@samsung.com>
Reported-by: Jovi Zhangwei <jovi.zhangwei@gmail.com>
Link: http://lkml.kernel.org/r/CAGdX0WFeEuy+DtpsJzyzn0343qEEjLX97+o1VREFkUEhndC+5Q@mail.gmail.com
Link: http://lkml.kernel.org/r/528D6972.9010702@samsung.com
Fixes: 9cbf117662 ("tracing/events: provide string with undefined size support")
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04 10:57:17 -08:00
Ian Maund
f06163e6d0 msm: reap unused kernel files
This change removes source files from the kernel tree that
were not being used during make. The list of used files
was generated using an annotated make log and was then
compared with new files added since the public release of
kernel version 3.10.00. New files which were added but
not used have been removed from the tree.

A diff was also run to determine the list of files that had
been modified since the release of kernel version 3.10.00.
These files were then scrubbed based on the current kernel
configuration, removing invalid and unused conditionals.

Some files which support planned functionality or are
useful in debugging have been excluded from this reap.

Change-Id: Ia44a224d3cea7bc78dd45e8a8279860d35d4b008
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2013-11-21 17:45:28 -08:00
Steve Muckle
26126dd5dc tracing/sched: add load balancer tracepoint
When doing performance analysis it can be useful to see exactly
what is going on with the load balancer - when it runs and why
exactly it may not be redistributing load.

This additional tracepoint will show the idle context of the
load balance operation (idle, not idle, newly idle), various
values from the load balancing operation, the final result,
and the new balance interval.

Change-Id: I1538c411c5f9d17d7d37d84ead6210756be2d884
Signed-off-by: Steve Muckle <smuckle@codeaurora.org>
2013-11-20 15:23:19 -08:00
Linux Build Service Account
f0156e3071 Merge "scsi: ufs: add trace support for ufs power management" 2013-11-20 01:00:42 -08:00
Sujit Reddy Thumma
cdc87d06f7 scsi: ufs: add trace support for ufs power management
Add ftrace support for profiling ufs power management latencies.
Usage:
	echo 1 > /sys/kernel/debug/tracing/events/ufs/enable
	cat /sys/kernel/debug/tracing/trace_pipe

Change-Id: If5c063179cc69a500d4902eb00b4ca3dc16e27f0
Signed-off-by: Sujit Reddy Thumma <sthumma@codeaurora.org>
2013-11-12 22:33:04 +05:30
Sarang Joshi
23925d1ee1 coresight: abort tracing for unhandled aborts
Add trace event to abort tracing for unhandled aborts such as
data abort and prefetch abort. A common event 'trace_unhandled_abort'
is shared for all unhandled aborts.

Change-Id: I6da9b30c74be48252402188a6f9a7703d21d6276
Signed-off-by: Sarang Joshi <spjoshi@codeaurora.org>
2013-11-05 15:05:05 -08:00
Abhimanyu Kapur
46b94d4710 ftrace: kmem: fix smmu ftrace entries
Use architecture portable unsigned long types
instead of integer type.

Change-Id: Ie345945f7d5edc0b646f7921444a8842ad3d200e
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2013-10-15 17:29:17 -07:00
Laura Abbott
5577885adb gpu: ion: Copy client name into trace event
ftrace saves the information from events into a buffer to
be parsed out later. If the Ion client dies between the time
the event happens and the events are parsed, the reference to
the client name may have become invalid. Fix this by making a
local copy of the client name for event parsing.

Change-Id: I608103c763526aef0e8dd5a563be1949643e4199
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2013-09-04 16:50:29 -07:00
Adrian Alexei
1e7aa59668 iommu: msm: Add Tracepoints to msm_iommu_pagetable.c
Add trace events to kmem.h and set up trace points in iommu
pagetable to keep track of what size pages we are allocate.

Change-Id: I6b80e0c652046a513808c8e3ae7dbce6510ba20d
Signed-off-by: Adrian Alexei <aalexei@codeaurora.org>
2013-09-04 16:26:07 -07:00